SQL Server Connection through .ini File
mvarConnectionString = "Provider=sqloledb;"
mvarConnectionString &= "Data Source=" & mvarServerName & ";Network Library=DBMSSOCN;"
mvarConnectionString &= "Initial Catalog=eAlert;"
mvarConnectionString &= "User ID=" & mvarUserName & ";Password=" & mvarPassword & ";"
mvarServerName = ""
mvarUserName = ""
mvarPassword = ""
KeyName(1) = "ServerName"
KeyName(2) = "UserName"
KeyName(3) = "Password"
ReadINIFile("C:\eAlert.ini", "eAlert", KeyName, KeyValues)
mvarServerName = KeyValues(1)
mvarUserName = KeyValues(2)
mvarPassword = KeyValues(3)
INI File
[eAlert]
UserName=sa
Password=Altius2005
ServerName=CBE-SERVER
Written by Mohamed Noufel
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Sql server
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#