M
muyBN
Does anyone know if it's possible, when inserting values into a database like
I'm showing below, to use the "@variable" form? This is something I've done
with ASP but not sure if it can be done in VBA; or if I'm just not handling
it correctly.
strSQL = "INSERT INTO [TableName] (CO, JOB) VALUES(@CO,@JOB)"
I received errors while trying to define the parameters as shown below. The
error came from the first parenthesis in the first line.
cmdInsert = New adodb.Command( strsql, csconn)
cmdInsert.Parameters.Add( new SqlParameter( "@CO", CO)
cmdInsert.Parameters.Add( new SqlParameter( "@JOB", JOB)
Could it be that there is a VB reference I need to add, or am I missing some
other concept?
I'm showing below, to use the "@variable" form? This is something I've done
with ASP but not sure if it can be done in VBA; or if I'm just not handling
it correctly.
strSQL = "INSERT INTO [TableName] (CO, JOB) VALUES(@CO,@JOB)"
I received errors while trying to define the parameters as shown below. The
error came from the first parenthesis in the first line.
cmdInsert = New adodb.Command( strsql, csconn)
cmdInsert.Parameters.Add( new SqlParameter( "@CO", CO)
cmdInsert.Parameters.Add( new SqlParameter( "@JOB", JOB)
Could it be that there is a VB reference I need to add, or am I missing some
other concept?