Hi,

I have several .vbs script to inspect my database with queries like
select count(*) as 'count' from tb_data where err_count > 0
select id, folder from tb_data where date > '2004-07-01'
I always use an ADODB.Connect en .Recordset to get the information. But
now I want to query
select e.id, e.folder, d.folder from tb_error e, tb_data d
where e.id = d.id

Works in ISQL, but I could not find any information in the SQL-server
books-online except for ASP programming. I don't have a webserver.

Any hints on how to use ADODB.Connect (or maybe ADODB.Command)??

Tnx
Rob

Re: retrieving SQL-server data by Viatcheslav

Viatcheslav
Fri Jul 16 05:54:52 CDT 2004

dim connStr, SQL, rs

connStr = "Provider=SQLOLEDB;Integrated Security=SSPI;Initial Catalog=XXX;"
SQL = "select e.id ..... where e.id = d.id"
rs.Open SQL, connStr, 2, 3, 1
'2 - adOpenDynamic, 2 - adLockOptimistic, 1 - adCmdText

//------------------------------------
Regards,
Vassiliev V. V.
http://www-sharp.com -
Scripting/HTA/.Net Framework IDE

"Rob Moerland" <rob.moerland@hetnet.nl> ???????/???????? ? ????????
?????????: news:cd6np8$l3n$1@reader08.wxs.nl...
> Hi,
>
> I have several .vbs script to inspect my database with queries like
> select count(*) as 'count' from tb_data where err_count > 0
> select id, folder from tb_data where date > '2004-07-01'
> I always use an ADODB.Connect en .Recordset to get the information. But
> now I want to query
> select e.id, e.folder, d.folder from tb_error e, tb_data d
> where e.id = d.id
>
> Works in ISQL, but I could not find any information in the SQL-server
> books-online except for ASP programming. I don't have a webserver.
>
> Any hints on how to use ADODB.Connect (or maybe ADODB.Command)??
>
> Tnx
> Rob