Rota Posted September 11, 2008 Share Posted September 11, 2008 Hi Buddies, I am going crazy about one SQL error in ACCESS, please help on below: test.zip I attached 3 different forms to open a "select *" sql from a Access file, while it always give a open error, for example: $oRec.Open ("SELECT * FROM " & $adTable & " Where " & $adCol & " = " & $Find , $oADO) $oRec.Open ("SELECT * FROM " & $adTable & " Where " & $adCol & " = " & $Find , $oADO)^ ERROR I have no idea how this come... please help. Thanks a ton. Link to comment Share on other sites More sharing options...
Rota Posted September 12, 2008 Author Share Posted September 12, 2008 Any one in help for this SQL problem... Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 12, 2008 Share Posted September 12, 2008 Hi Buddies, I am going crazy about one SQL error in ACCESS, please help on below: test.zip I attached 3 different forms to open a "select *" sql from a Access file, while it always give a open error, for example: $oRec.Open ("SELECT * FROM " & $adTable & " Where " & $adCol & " = " & $Find , $oADO) $oRec.Open ("SELECT * FROM " & $adTable & " Where " & $adCol & " = " & $Find , $oADO)^ ERROR I have no idea how this come... please help. Thanks a ton. I would help if you posted the actual error, vice just the quoted line. Did it say something like "requires an object"? Did you test IsObj($oRec) before trying to use it? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Rota Posted September 18, 2008 Author Share Posted September 18, 2008 Thanks PsaltyDS, Yes, of course I used IsObj($oRec) in one of my searching function, could you please look in my attachment which I prepared 3 sample as well as my sample database, while 2 of them were totally not working in my pc, another one worked in mine but not in other pc. Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 18, 2008 Share Posted September 18, 2008 Thanks PsaltyDS,Yes, of course I used IsObj($oRec) in one of my searching function, could you please look in my attachment which I prepared 3 sample as well as my sample database, while 2 of them were totally not working in my pc, another one worked in mine but not in other pc.If I think of it when I'm not in Windows-land I'll crack it open and take a look, but I don't usually work with untrusted downloads from the forums. It would help if you could just post plain text info here. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
DaRam Posted September 18, 2008 Share Posted September 18, 2008 It really helps ( ) that you do not include the include - #include<ACcess.au3> Since adCol="txt1", I presume this is a Text data type column/field. Try: $oRec.Open ("SELECT * FROM [" & $adTable & "] WHERE [" & $adCol & "] = '" & $Find & "'", $oADO) Or Just: $oRec.Open ("SELECT * FROM " & $adTable & " WHERE " & $adCol & " = '" & $Find & "'", $oADO) 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