| |
aru1683
Posts: 25
Score: 0
Joined: 7/1/2007
From: India
Status: offline
|
Hi All, I am using the following script to check some count of work in the db. But this script was giving me an error type mismatch. i think the error is at rows=connection.execute(IME). this connection.execute returns the count of the work. so help me what should be done to make this work.? ----------------------------------------------------------------------------------------------------------------------- Option Explicit Const IME = "select count (*) from work where name = 'working'" Dim connectionString connectionString = "DRIVER={SQL Server};SERVER=cpsrimp;UID=lSuper;PWD=getMeIn;DATABASE=logical" Dim connection: Set connection = CreateObject("ADODB.Connection") Dim rows: Set rows = CreateObject("ADODB.Recordset") '* Create objects '* Open connection connection.Open connectionString '* Execute SQL rows = connection.Execute(IME) msgbox rows set connection = nothing ------------------------------------------------------------------------------------------------------------------------------ error : C:\Documents and Settings\Desktop\dbs.vbs(18, 1) Microsoft VBScript runt ime error: Wrong number of arguments or invalid property assignment
|
|