sirWimelef Posted December 11, 2008 Posted December 11, 2008 i working on a script that take info froma MS SQL server 2k and tranfer it to a excel object the problem is in this simple code: $sqlCon = ObjCreate("ADODB.Connection") $sqlCon.Open("Driver={SQL Server};Server=192.9.200.6;Database=MVXJDTA;Uid=Test;Pwd=tesT;") $RS=$sqlCon.EXECUTE("SELECT KPPCDT,* FROM MVXJDTA.MCCOMA WHERE KPVASE in ('604AA000001') AND KPPCDT=20031215") MsgBox(1,"",$RS.fieldS("KPPCDT").VALUE) the text that appears on the msgbox is "20031216" i dont find logical on this,I'm saying explicitly that should be KPPCDT=20031215, and i take that field again on the msg box if i execute these same sql on a querys program the field is correct
BrettF Posted December 11, 2008 Posted December 11, 2008 What about $sqlCon = ObjCreate("ADODB.Connection") $sqlCon.Open("Driver={SQL Server};Server=192.9.200.6;Database=MVXJDTA;Uid=Test;Pwd=tesT;") $RS=$sqlCon.EXECUTE("SELECT * FROM MVXJDTA.MCCOMA WHERE KPVASE in ('604AA000001') AND KPPCDT=20031215") MsgBox(1,"",$RS.fieldS("KPPCDT").VALUE) An example of the contents of the database might help too Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
sirWimelef Posted December 11, 2008 Author Posted December 11, 2008 (edited) well, i solved it updating to the last version of autoit Edited December 11, 2008 by sirWimelef
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