Hi -
Does anyone have any experience working (successfully) with odbc_specialcolumns?
I'm using ODBC to communicate with SQL Server 7 -- directly from Windows 2k platform (and also through Easysoft ODBC on RedHat Linux). In particular, I want to use odbc_specialcolumns to find the Identity column for a table.
The signature for the odbc_specialcolumns function looks like:
int odbc_specialcolumns (int connection_id, int type, string qualifier, string owner, string table, int scope, int nullable)
I spent awhile trying to find out what these "qualifier", "scope" and "nullable" variables needed to be set to. From Microsoft documentation I came up with the following functional call (where $DBLINKID and $ODBC_INSERT_TABLE are my own values):
odbc_specialcolumns($DBLINKID, "SQL_BEST_ROWID", "%", "%", $ODBC_INSERT_TABLE, "SQL_SCOPE_SESSION","SQL_NULLABLE");
I've tried a few different combinations--especially for the qualifier (which I don't really understand) and owner parameters, set to '%' in the call above.
In short, all I'm getting is:
Warning: SQL error: , SQL state 00000 in SQLSpecialColumns in C:\Inetpub\wwwroot\testodbc.php on line 25
That error doesn't seem to change when I change the parameters. Does anyone have this working -- particularly with SQL Server?
Thanks!
Hans
Does anyone have any experience working (successfully) with odbc_specialcolumns?
I'm using ODBC to communicate with SQL Server 7 -- directly from Windows 2k platform (and also through Easysoft ODBC on RedHat Linux). In particular, I want to use odbc_specialcolumns to find the Identity column for a table.
The signature for the odbc_specialcolumns function looks like:
int odbc_specialcolumns (int connection_id, int type, string qualifier, string owner, string table, int scope, int nullable)
I spent awhile trying to find out what these "qualifier", "scope" and "nullable" variables needed to be set to. From Microsoft documentation I came up with the following functional call (where $DBLINKID and $ODBC_INSERT_TABLE are my own values):
odbc_specialcolumns($DBLINKID, "SQL_BEST_ROWID", "%", "%", $ODBC_INSERT_TABLE, "SQL_SCOPE_SESSION","SQL_NULLABLE");
I've tried a few different combinations--especially for the qualifier (which I don't really understand) and owner parameters, set to '%' in the call above.
In short, all I'm getting is:
Warning: SQL error: , SQL state 00000 in SQLSpecialColumns in C:\Inetpub\wwwroot\testodbc.php on line 25
That error doesn't seem to change when I change the parameters. Does anyone have this working -- particularly with SQL Server?
Thanks!
Hans