Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Can I execute Script File (.sql) from a VB

Author  Topic 

Aiby
Yak Posting Veteran

71 Posts

Posted - 2005-02-01 : 02:24:53
Can I execute Script File (.sql) from a VB Application.. can any one sugest a basic code to start to test.. and learn..

Thank you..

Aiby Mohan Das
Analyst Programmer
Decibel Infotech P.Ltd.
Kerala, India
Email: Aiby@hotmail.com

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-02-01 : 03:57:23
Using File System Object, Read query from .sql file and use that query in your VB Application

Madhivanan
Go to Top of Page

SqlStar
Posting Yak Master

121 Posts

Posted - 2005-02-01 : 04:18:34
Hi,

I hope you may aware about "Shell" command in VB. Just see "osql" OR "isql" command examples in SQL Server Help. Once you get ideas about those commands, you can excute that "osql" or "isql" using VB's "Shell" command.

Example:

osql /U sa /P sa /S Servername /D databasename /i e:\query.sql /o e:\result.log

Thanks.


:) While we stop to think, we often miss our opportunity :)
Go to Top of Page

Aiby
Yak Posting Veteran

71 Posts

Posted - 2005-02-01 : 12:30:55
Can any One Sugest me how to use SQLDMO in VB application.

Aiby Mohan Das
Analyst Programmer
Decibel Infotech P.Ltd.
Kerala, India
Email: Aiby@hotmail.com
Go to Top of Page

AndyB13
Aged Yak Warrior

583 Posts

Posted - 2005-02-01 : 13:23:33
Refer to BOL "SQL-DMO Samples"

[BOLSmiley]
Go to Top of Page

Aiby
Yak Posting Veteran

71 Posts

Posted - 2005-02-02 : 08:15:50
quote:
Originally posted by AndyB13

Refer to BOL "SQL-DMO Samples"

[BOLSmiley]



Thank you
Go to Top of Page
   

- Advertisement -