You are here: Re: using vbs « MsSQL Server « IT news, forums, messages
Re: using vbs

Posted by Dan Guzman on 11/28/06 02:14

The most common method used to access SQL Server from VBScript is ADO. An
OLEDB example:

Set connection = CreateObject("ADBDB.Connection")
connection.Open "Provider=SQLOLEDB" & _
";Data Source=MyServer" & _
";Initial Catalog=MyDatabase" & _
";Integrated Security=SSPI"

If you are using SQL 2005, you can use the SQL Native Client provider
(SQLNCLI).

--
Hope this helps.

Dan Guzman
SQL Server MVP

<akkha1234@gmail.com> wrote in message
news:1164676554.556065.232870@l39g2000cwd.googlegroups.com...
> Hi,
>
> I have written some batch scripts using osql to run some sql
> statements. They are basically something simple (such as running a
> stored procedure etc).
> I want to convert them to run using vbs. What kind of connection option
> do I have? I notice we can use DMO but I guess they are now phased out
> by Microsoft. Most of the example I see requires the setting up of
> ODBC. Is there a way of not using ODBC but direct connection (just like
> osql or isql)?
> Thanks for any hints or directions to some web sites.
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация