- Local time
- Today, 00:57
- Joined
- Feb 19, 2002
- Messages
- 47,145
Has anyone ever used the procedure described in "Q159691 - Procedure to Create Data Sources and Relink ODBC Tables" to successfully create a DSN for a Sybase System 11 database?
I modified the DBEngine.RegisterDatabase statement to use a variable rather than a literal to specify the Driver I wanted to use and added that column to the table used by the procedure. The code works properly for my DB2 tables but fails with an error 3151 when trying to link or refresh the link for a Sybase table.
Using the Control Panel I can look at the DSN's created by the procedure and they don't show a value in the Server Name field even though one is provided in the code. This doesn't seem to bother the DB2 DSN, I can use it either in code or manually to link tables. If I manually change the Sybase DSN so that it includes the Server name it works fine. I'm flying blind here because I don't have any documentation for the Sybase System 11 ODBC driver but I took a shot and added "ServerName=blahblah" to the other parameters in the RegisterDatabase Method. That managed to get the Server name to actually show in the Server name field but the link via code still failed with error 3151. However, trying to use this DSN manually to link results in a very strange message - Intersolve(ODBC SQL Server driver) Number contains an invalid character: 0 - Default(#2702). For some reason this DSN now thinks it is for an SQL Server databse rather than Sybase System 11. We're using the Sybase driver not an Intersolve driver. Anyway, if I edit the DSN through the Control panel interface and just retype the server name, it works just fine.
I modified the DBEngine.RegisterDatabase statement to use a variable rather than a literal to specify the Driver I wanted to use and added that column to the table used by the procedure. The code works properly for my DB2 tables but fails with an error 3151 when trying to link or refresh the link for a Sybase table.
Using the Control Panel I can look at the DSN's created by the procedure and they don't show a value in the Server Name field even though one is provided in the code. This doesn't seem to bother the DB2 DSN, I can use it either in code or manually to link tables. If I manually change the Sybase DSN so that it includes the Server name it works fine. I'm flying blind here because I don't have any documentation for the Sybase System 11 ODBC driver but I took a shot and added "ServerName=blahblah" to the other parameters in the RegisterDatabase Method. That managed to get the Server name to actually show in the Server name field but the link via code still failed with error 3151. However, trying to use this DSN manually to link results in a very strange message - Intersolve(ODBC SQL Server driver) Number contains an invalid character: 0 - Default(#2702). For some reason this DSN now thinks it is for an SQL Server databse rather than Sybase System 11. We're using the Sybase driver not an Intersolve driver. Anyway, if I edit the DSN through the Control panel interface and just retype the server name, it works just fine.