errors different when executing SQL statements via recordset or connection object 
Author Message
 errors different when executing SQL statements via recordset or connection object

Hi,

I have a little problem.
When I have a table opened in design mode in Access 97 and execute an
ODBC-SQL SELEDT statement via:

$connection = $Server->CreateObject("ADODB.Connection");
$connection->open("DSN='';uid='';pwd=''");
$connection->execute($_[3]);

I will get the nice error message:

"Table 'X' is exclusively locked by user 'Admin' on machine 'X'"

BUT:
If I do the same with the recordset object:

   $connection = $Server->CreateObject("ADODB.Connection");
   $recordSet = $Server->CreateObject("ADODB.RecordSet");
   $connection->open("DSN='';uid='';pwd=''");

$recordSet->open($SQLquery,$connection,$adOpenKeySet,$adLockReadOnly);

I get the errormessage:
"The request properties can not be supported by this ODBC Driver."

But I want the previous error-message!
Is there anybody who knows how I can generate the same error (of the
first example) with the recordset object (the second example)?

I hope somebody can help me.
Jeroen



Wed, 20 Jun 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. SQL Statement Executed by Recordset

2. creating two SQL statements and 2 recordsets in the same connection

3. SQL statement error (Problem when more than once execute)

4. Write One SQL statement execute in Oracle and SQL Server

5. Recordset Experts...SQL statement on an open recordset?

6. Trouble w/connection.execute command and for each statement

7. Trouble w/connection.execute command and for each statement

8. Connection Errors via ADO Connection Object

9. When I use connection object (ADO) to execute this statement

10. VB skip ADO Connection.Execute statement

11. Returned recordset is closed when executing stored procedure with Insert Into statement

12. Can't execute a user define function in an SQL statement

 

 
Powered by phpBB® Forum Software