Rishav Posted March 15, 2009 Posted March 15, 2009 Greetings folksOne of the prerequisites of my test cases is that a table should contain certain data in it. So instead of putting in data in the db everytime I want to run the test case, I've decided to add it to the Autoit script.At present I am using a batch file which invokes a .sql file. I want to do this seamlessly without opening the command prompt.the batch file command is;SQLCMD -S %ServerName% -d %DBName% -U %UserName% -P %Password% -i Insertdata.sqland the insert statements are;insert into TabABC (CUTYPE) values ('XYZ') insert into TabABC (CUTYPE) values ('ABC') GO insert into TabPQR (CUTYPE, EXRATE, CHANGEDATE, EXPIRYDATE) values ('XYZ', 1, CONVERT(datetime, FLOOR(CONVERT(float(24), GETDATE())) ), null) insert into TabPQR (CUTYPE, EXRATE, CHANGEDATE, EXPIRYDATE) values ('STU', 1.5, CONVERT(datetime, FLOOR(CONVERT(float(24), GETDATE())) ),null) GOany ideas how can I accomlpish this?regardsRishav
/dev/null Posted March 15, 2009 Posted March 15, 2009 any ideas how can I accomlpish this?regardsRishavuse ODBC to connect to the database. Search the forum for "+ObjCreate +ADODB +DRIVER" for samples how to do that.Kurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
Rishav Posted March 15, 2009 Author Posted March 15, 2009 Thanks Kurt. I did snoop around ODBC but didn't check for objcreate with it. this should help me a lot.
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