General information
Category:
Database DAO/RDO/ODBC/ADO
Title:
SQLConfigDataSource not working as it should
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only