create dsn
Anyone know how to create DSN for SQL2000 and postgres in the vb coding... thanks!!
Web Development
Anyone know how to create DSN for SQL2000 and postgres in the vb coding... thanks!!
by itpreneur
Dim fsn As New Scripting.FileSystemObject
Dim myDsn As Scripting.TextStream
Set myDsn = fsn.CreateTextFile("c:\viju.dsn")
myDsn.WriteLine "[ODBC]"
myDsn.WriteLine "DRIVER=Microsoft Access Driver (*.mdb)"
myDsn.WriteLine "UID = admin"
myDsn.WriteLine "UserCommitSync = Yes"
myDsn.WriteLine "Threads = 3"
myDsn.WriteLine "SafeTransactions = 0"
myDsn.WriteLine "PageTimeout = 5"
myDsn.WriteLine "MaxScanRows = 8"
myDsn.WriteLine "MaxBufferSize = 512"
myDsn.WriteLine "ImplicitCommitSync = Yes"
myDsn.WriteLine "FIL=SQL Server"
myDsn.WriteLine "DriverId = 25"
myDsn.WriteLine "DefaultDir=C:\"
myDsn.WriteLine "DBQ=C:\DIRECTORY\FILENAME.MDF" '& yourfilename
MsgBox "Your DSN is Created Now"
' Just change the driver to SQL SERVER (*.mdf)
UID='sa' or any administrator user id
PASSWORD='any password' password use to access sql server or leave blankif default for userid sa
by whyong
by whyong
This discussion is closed to new replies.
Sort by Trending