OleDB to SQL Server

General discussion forum about all databases other than SqlBase.
ianrudge

OleDB to SQL Server

Post by ianrudge » 07 Mar 2013, 11:32

We are just experimenting with OLEDB and followed the instructions using SqlUDL

Set SqlUDL = 'Provider=SQLOLEDB.1;Password=xxxxxxx;Persist Security Info=True;User ID=auser;Initial Catalog=SEC;Data Source=BOttRIS'

We then SqlConnect( hSqlHandle ) but after a wait we get

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

Kumuthini Ragavan

Re: OleDB to SQL Server

Post by Kumuthini Ragavan » 07 Mar 2013, 13:13

Create an empty udl file on your desktop (a file with udl extention eg. test.udl). Double click on it and enter the details you provided in the set SqlUDL and test connect. If it connects then your application should connect. If it doesn't then there is a problem with the properties entered. Hope this helps. Kumuthini Ragavan

ianrudge

Re: OleDB to SQL Server

Post by ianrudge » 07 Mar 2013, 15:25

Thank you Kumuthini

However that isn't the cause of the problem. After walking through the code you must ensure that the constant SqlDatabase is null!

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests