supongo que es por VB
usa la libreria odbccp32.dll
declarala
Declare Function SQLConfigDataSource Lib "odbccp32.dll" (ByVal hwndParent As Long, ByVal fRequest As Integer, ByVal lpszDriver As String, ByVal lpszAttributes As String) As Long
luego la creas y/o modificas
strDSNString = ""
strDSNString = strDSNString & "DSN=" & strDSN & Chr(0)
strDSNString = strDSNString & "DESCRIPTION=" & "Conexión Creada por Programa (" & App.EXEName & ")- " & CStr(Now) & Chr(0)
strDSNString = strDSNString & "Server=" & strServerName & Chr(0)
strDSNString = strDSNString & "DATABASE=" & strDBName & Chr(0)
strDSNString = strDSNString & Chr(0)
If Not CBool(SQLConfigDataSource(0&, 1, "SQL Server", strDSNString)) Then
boolError = True
MsgBox "Error al preparar DSN", vbExclamation
Exit Function
End If
espero te ayude
Saludos
JK