RE:Creación de DSN para Acces
Saludos desde Costa Rica...
Aka te pongo un ejemplo ke baje hace algun tiempo, espero ke te sirva...
\'PURPOSE: \'CREATES A SYSTEM DSN FOR AN SQL SERVER DATABASE
\'PARAMETERS: \'DSNName = DSN Name
\'ServerName = Name of Server
\'Database = Database to Use
\'RETURNS: True if successful, false otherwise
\'EXAMPLE: CreateSQLServerDSN \"MyDSN\", \"MyServer\", \"MyDatabase\"
Public Function CreateSQLServerDSN(DSNName As String, ServerName As String, Database As String) As Boolean
Dim sAttributes As String
sAttributes = \"DSN=\" & DSNName & Chr(0)
sAttributes = sAttributes & \"Server=\" & ServerName & Chr(0)
sAttributes = sAttributes & \"Database=\" & Database & Chr(0)
CreateSQLServerDSN = CreateDSN(\"SQL Server\", sAttributes)
End Function
\'PURPOSE: \'CREATES A SYSTEM DSN FOR AN ACCESS DATABASE
\'PARAMETERS: \'DSNName = DSN Name
\'DatabaseFullPath = Full Path to .mdb file
\'RETURNS: True if successful, false otherwise
\'EXAMPLE: CreateAccessDSN \"MyDSN\", \"C:\\MyDb.mdb\"
Public Function CreateAccessDSN(DSNName As String, DatabaseFullPath As String) As Boolean
Dim sAttributes As String
\'TEST TO SEE IF FILE EXISTS: YOU CAN REMOVE IF YOU
\'DON\'T WANT IT
If Dir(DatabaseFullPath) = \"\" Then
MsgBox \"Invalid Path\"
Exit Function
End If
sAttributes = \"