Re: Question about query sql server database

From: Bob Barrows [MVP] (reb01501_at_NOyahoo.SPAMcom)
Date: 03/10/05


Date: Thu, 10 Mar 2005 14:43:48 -0500

It's pretty much the same code that you would use in asp or even in VB:
instantiate (using CreateObject) and open an ADO connection, then use it to
execute a sql statement, assigning the result to an ADO recordset if the
query returns records.

Google should find you plenty of examples.

Sorry, but my policy is not to send email, preferring to keep responses in
the newsgroup where everybody can read them, via Google or otherwise.

Bob Barrows

Tash wrote:
> So is it possible for lets say to query a sql server 7.0 or 8 (2000)
> database on an NT machine from a straight sbscript (.vbs) file.
>
> Please email back if you have any sample code.
>
> ny3ranger@gmail.com
> ny3ranger@hotmail.com
>
> "Bob Barrows [MVP]" wrote:
>
>> Roy wrote:
>>> I have a SQL Server
>>
>> What version?
>>
>>> possiblely with a database installed on it. I
>>> want to test if the database is installed
>>
>> The answer to this depends on what version of SQL Server you are
>> using.
>>
>>> and query for a table if it
>>> is installed. How do I do it with VBScript code? Any sample code?
>> http://www.aspfaq.com/show.asp?id=2178
>>
>> Bob Barrows
>>
>> --
>> Microsoft MVP - ASP/ASP.NET
>> Please reply to the newsgroup. This email account is my spam trap so
>> I don't check it very often. If you must reply off-line, then remove
>> the "NO SPAM"

-- 
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


Relevant Pages

  • Re: Updating column property on table gives error
    ... in code instead of when the append happens. ... Please reply to the newsgroup. ... This email account is my spam trap so I ...
    (microsoft.public.data.ado)
  • Re: Writing a GUID to a SQL table
    ... I strongly suspect that it is SQL Server, ... >> Please reply to the newsgroup. ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.db)
  • Re: YYYYMMDD
    ... > breakpoint but it dosen't stop it at the breakpoint,should I add ... >> a quicker response by posting to the newsgroup. ... This email account is my spam trap so I ...
    (microsoft.public.scripting.vbscript)
  • Re: Error in asp page
    ... This is because you need to turn Simple File Sharing off. ... >> quicker response by posting to the newsgroup. ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.general)
  • Re: I just dont understand why...
    ... This is a newsgroup, not Richard's email account. ... I did not say it was a private conversation, ... Party season with you must be a real challenge to listen and learn! ...
    (rec.boats.paddle)