Ghost21 Posted January 29, 2008 Share 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,,,, Link to comment Share on other sites More sharing options...
therks Posted January 29, 2008 Share 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 Link to comment Share on other sites More sharing options...
Ghost21 Posted January 29, 2008 Author Share 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!!! Link to comment Share on other sites More sharing options...
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