Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB 6 Question

Status
Not open for further replies.

jcook32

Programmer
Jun 11, 2003
20
US
I need to do several things with a VB exe.

1 When a user logs in a login script is run. I need to get the login ID. Not sure if there is a standard way of getting this.

2How do you open a IE browser window automaticly from VB

3What section of the VB project would all of the above go and where would a sql statement go?

Thanks
need help fast

jcook32
 
1) When the user logs into a computer or when the user logs into your program?

2)Create an instance of the internet explorer object.

3)Where ever you want to put it, you are the one designing the program.

"Every day is like a precious gift, you have to make it count" James Birrell 1993-2001
 
Sounds suspiciously like homework.

Andy
"Logic is invincible because in order to combat logic it is necessary to use logic." -- Pierre Boutroux
"A computer program does what you tell it to do, not what you want it to do." -- Greer's Third Law
 
I need the code to do a loop using the record set EOF
Here is what I have:(i get an error)


rsuserinfo.Recordset.MoveFirst
Do While Not (rsuserinfo.Recordset.EOF)


rsuserinfo.MoveNext
Loop

thanks
 
And you get the error where?

Andy
"Logic is invincible because in order to combat logic it is necessary to use logic." -- Pierre Boutroux
"A computer program does what you tell it to do, not what you want it to do." -- Greer's Third Law
 
when i run the project.

runtime error 438
Object does not support this property or method
 
Yes, okay, but where? At what instruction?

Andy
"Logic is invincible because in order to combat logic it is necessary to use logic." -- Pierre Boutroux
"A computer program does what you tell it to do, not what you want it to do." -- Greer's Third Law
 
when the loop tries to execute
This is all my code

Private Sub Form_Load()
Set objLoginInformation = CreateObject("WScript.Network")
Dim adoConn As New ADODB.Connection
adoConn.Provider = "SQLOLEDB.1"
adoConn.ConnectionString = "Server=DTE_PGH;Database=intranet;Uid=sa;Pwd=;"
adoConn.Open
MsgBox "Connected Successfully!"
strSQL = "Select ID,[group],title,email,office,department,Virtual_Grp,ActPartner from tblBIO where email ='" & objLoginInformation.UserName & "'"
MsgBox "this is the sqlstring " & strSQL
rsuserinfo = adoConn.Execute(strSQL)
MsgBox rsuserinfo("ID")
'MsgBox "The currently logged on user is " & objLoginInformation.UserName & ".", vbInformation, "User"
strSQL2 = "SELECT * FROM Security_tblAccess WHERE PageId=10"
rsSecure = adoConn.Execute(strSQL2)
MsgBox rsSecure("User_ID")
MsgBox rsuserinfo("ID")
rsuserinfo.Recordset.MoveFirst-this is where the error is
Do While Not (rsuserinfo.Recordset.EOF)


rsuserinfo.MoveNext
Loop
ShellExecute vbNull, "open", " vbNull, vbNull, 1

'End
End Sub
 
Does it really matter where the error is .
I need code for a do while loop using the recordset EOF

do you know what the code is???
 
Assuming
Code:
rsuserinfo
is an ADODB.Recordset then you should use
Code:
rsuserinfo.MoveFirst

Andy
"Logic is invincible because in order to combat logic it is necessary to use logic." -- Pierre Boutroux
"A computer program does what you tell it to do, not what you want it to do." -- Greer's Third Law
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top