Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLConfigDataSource not working as it should
Message
From
06/09/2001 04:40:22
 
 
To
All
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
SQLConfigDataSource not working as it should
Miscellaneous
Thread ID:
00553000
Message ID:
00553000
Views:
53
Hi

I am using VBA to create a system DSN entry.

The code creates the description, the database name, etc , but will not create
the server name

here is the code

********************************************************************
#If Win32 Then
Dim intRet As Long
#Else
Dim intRet As Integer
#End If
Dim strDriver As String
Dim strAttributes As String

'Set the driver to SQL Server because it is most common.
strDriver = "Sybase System 11"
'Set the attributes delimited by null.
'See driver documentation for a complete
'list of supported attributes.

strAttributes = strAttributes & "DESCRIPTION=" & lcDnsToCreate & Chr$(0)
strAttributes = strAttributes & "DSN=fred" & Chr$(0)
strAttributes = strAttributes & "SERVER=" & lcDnsToCreate & Chr$(0)
strAttributes = strAttributes & "DATABASE=" & Chr$(0)

'To show dialog, use Form1.Hwnd instead of vbAPINull.


intRet = SQLConfigDataSource(vbAPINull, ODBC_ADD__SYS_DSN, _
strDriver, strAttributes)

**********************************************************************


Has anyone came across this before, and found a solution to the problem ?

Hope you can help

Regards


Steven Bowskill
Next
Reply
Map
View

Click here to load this message in the networking platform