tn_sudheer
Programmer
Good Evening Members,
Here i want to access data from Database using VBScript, so regarding that i have gone through some of the examples ,but none of them working in my case.
My DB name Dummy
ODBC Data Source connection DDSN
Logging in to db using windows authantication.
Some how by seeing some examples i prepared my script which is not working..
so by some basics i understand that we want to make connection to database & table, open that connection, execute the required query, close the connection
here is my script
dim obj,obj1, str
dim dbquery
set obj = createobject("adodb.connection")
set obj1 = createobject("adodb.recordset")
obj.open "dsn=ddsn;uid=DESKTOP-FUJ7MOA\Shanthkumar_PIASPL,password=,database=dummy"
obj1.open "insert into table_1(empid)values(100)"
obj1.execute
obj1.close
obj.close
set obj1 = nothing
set obj = nothing
when i run my bat file it showing an error
Plz can anyone help me where its went wrong.
Here i want to access data from Database using VBScript, so regarding that i have gone through some of the examples ,but none of them working in my case.
My DB name Dummy
ODBC Data Source connection DDSN
Logging in to db using windows authantication.
Some how by seeing some examples i prepared my script which is not working..
so by some basics i understand that we want to make connection to database & table, open that connection, execute the required query, close the connection
here is my script
dim obj,obj1, str
dim dbquery
set obj = createobject("adodb.connection")
set obj1 = createobject("adodb.recordset")
obj.open "dsn=ddsn;uid=DESKTOP-FUJ7MOA\Shanthkumar_PIASPL,password=,database=dummy"
obj1.open "insert into table_1(empid)values(100)"
obj1.execute
obj1.close
obj.close
set obj1 = nothing
set obj = nothing
when i run my bat file it showing an error
Plz can anyone help me where its went wrong.