Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - authenticate to firewall

Reply
 
Old 09-03-2009   #1 (permalink)
James


 
 

authenticate to firewall

I have a script to connect to a database and run a query but prior to
connecting to the database I need to authenticate to a firewall. Is
three a way to do this in vbscript?

DIM objConn, strConnection, objRS, strQuery
Set objConn = CreateObject("ADODB.Connection")

strConnection = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=192.168.0.1;
PORT=3306;" &_
"DATABASE=mydb; USER=user; PASSWORD=password; OPTION=3;"
objConn.open strConnection
set objRS = CreateObject("ADODB.RecordSet")
set objRS.ActiveConnection = objConn

strQuery = "select login,password from users where companyid=105"

objRS.Open strQuery
If objRS.EOF Then
Wscript.Echo "Record cannot be found."
Else
Do until objRS.EOF
wscript.echo objRS("login") & " " & objRS("password")
objRS.MoveNext
loop
End if

objRS.close
Set objRS = Nothing
objConn.close
Set objConn = Nothing


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Vista can't authenticate on VPN connection Vista networking & sharing
Can connect over VPN but won't authenticate Vista networking & sharing
winpe, authenticate against domain Vista installation & setup
Unable to Authenticate when connecting to Vista PC from Mac Vista networking & sharing
Can't authenticate on Mac connection... Vista networking & sharing


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46