onedunpark
IS-IT--Management
Hello, Got a large DAO codebase to be updated, but for the time being my first task is to create a DSN-Less OpenConnection in DAO 3.6 to a SQL Server2000 database. Is this even possible? All of the examples I've come across relate to ADO. We'll get there eventually but are stuck with DAO in the short term. The followinfd code returns an 'Invalid Argument' message and I'm not sure what is exactly invalid.
Thanks in anticipation
Steven
Sub TESTCONN()
Dim vwkspc As Workspace
DefaultType = dbUseODBC
Dim vdbcon As Connection
' Initialise the program workspace
Set vwkspc = Workspaces(0)
Set vdbcon = vwkspc.OpenConnection("", _
dbDriverNoPrompt, _
Connect:="uid=USER1;pwd=PASS1;driver={SQL Server};" _
& "server=SQL1;database=DB1;"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Thanks in anticipation
Steven
Sub TESTCONN()
Dim vwkspc As Workspace
DefaultType = dbUseODBC
Dim vdbcon As Connection
' Initialise the program workspace
Set vwkspc = Workspaces(0)
Set vdbcon = vwkspc.OpenConnection("", _
dbDriverNoPrompt, _
Connect:="uid=USER1;pwd=PASS1;driver={SQL Server};" _
& "server=SQL1;database=DB1;"