Hi,
Am getting an error while executing the following code. Am using the ADO Command object. Pls. Help!!!
"CREATE"(objConn);
"CREATE"(objCmd);
objConn.ConnectionString := 'Driver={SQL Server};Server=Labperftest; Database=Aucon 410; userid=super; pwd=2332cc2';
objConn.ConnectionTimeout := 0;
objConn."CommandTimeout" := 0;
objConn.Open();
objCmd."ActiveConnection" := objConn;
objCmd."CommandType" :=4;
sqlStoredProcedure := STRSUBSTNO('EXEC p_SPTest ''%1''', "COMPANYNAME");
objCmd."CommandText" := sqlStoredProcedure;
objCmd.Execute;
The error which I get is -
Microsoft Business Solutions-Navision
Type conversion is not possible because 1 of the operators contains an invalid type.
Text := Automation
OK
Pls help!!!
Thanks
Srr
0
Comments
objCmd."ActiveConnection" := objConn;
Try this
VariantVar := objConn;
objCmd.ActiveConnection := VariantVar;
When I tried using the adAsyncExecute it Throws an error...
objCmd.Execute , , adAsyncExecute
Likewise I tried to open a connection asynchronously, again it flunked
objConn.Open , , adAsyncConnect
Its giving a syntax error...
Can anyone help me in this regard?
Thanks
SRR