Login script
hello all,
this simple. have written small login script writes username , ipaddress text file. have install mysql server , create a connection odbc. there simple visual basic write these data directory mysql table using odbc connection ?
any great
m
i replied question once, can't see response. apologize if duplicate.
i have example vbscript program read comma delimited file, parse values, , use them insert rows access database linked here:
http://www.rlmueller.net/readcsv.htm
the program readcsvfile4.vbs, linked near bottom of page one. modify this fields (columns) in text file. your logon script append comma delimited rows text file. if values can have commas, must enclosed in quotes. instead of connection access database, need connection sql server database. typically use code similar below:
' construct connection string sql server database. strconnect = "driver=sql server;" _ & "trusted_connection=yes;" _ & "database=mydatabase;" _ & "server="myserver"\myinstance" ' create ado objects , connect pocketlunch database. set adoconnection = createobject("adodb.connection") adoconnection.connectionstring = strconnect set adocommand = createobject("adodb.command") set adocommand.activeconnection = adoconnection
i use windows integrated authentication, hence "trusted_connection=yes" clause. if use sql logins must provide credentials in connection string. if use default rather a named instance, use "server=myserver". of course, subsitute server, database, , instance names. on connection strings, see link:
http://www.connectionstrings.com/
richard mueller
mvp adsi
Windows Server > Group Policy
Comments
Post a Comment