Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLConfigDataSource not working as it should
Message
De
06/09/2001 04:40:22
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Titre:
SQLConfigDataSource not working as it should
Divers
Thread ID:
00553000
Message ID:
00553000
Vues:
52
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform