Ghost21 Posted January 29, 2008 Posted January 29, 2008 I'm having trouble with an sql statement that I need to return all the info that = a certain PlayerID and OpponentID depending on what Plaer name I have selected from combo boxes $oRS.Open ("Select * FROM Batting WHERE PlayerID='" $PlayerID '"' & '"AND OpponentID="' $OpponentID '"', $oConn, 1, 3) Just doesn't seem to work.. Any help would be great,,,,
therks Posted January 29, 2008 Posted January 29, 2008 (edited) Have you EVER used strings before? Try creating a string that will work in a msgbox first before you start playing with that.$PlayerID = 'Rob' $OpponentID = 'Fred' MsgBox(0, 0, "Select * FROM Batting WHERE PlayerID='" $PlayerID '"' & '"AND OpponentID="' $OpponentID '"')Once you figure out how to make that run without getting errors, perhaps you can continue in a successful fashion.*Edit: And yes, I know that code doesn't work. That's the point. Edited January 29, 2008 by Saunders My AutoIt Stuff | My Github
Ghost21 Posted January 29, 2008 Author Posted January 29, 2008 Have you EVER used strings before? Try creating a string that will work in a msgbox first before you start playing with that. $PlayerID = 'Rob' $OpponentID = 'Fred' MsgBox(0, 0, "Select * FROM Batting WHERE PlayerID='" $PlayerID '"' & '"AND OpponentID="' $OpponentID '"') Once you figure out how to make that run without getting errors, perhaps you can continue in a successful fashion. *Edit: And yes, I know that code doesn't work. That's the point. I never even knew you could use a message box like that.. Thanks for the GREAT HELP!!!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now