can i run such a transact SQL script with VB
use master
go
create database Ayhandeneme
on (Name=AyhanDeneme_Dat, FileName='c:ayhandeneme.mdf')
go
You cannot execute the GO, as it is a batch seperator defined by the SQL Server tools. You will have to set the context in your connection command, or simply run it in two different batches.
But you should be able to run any T-SQL command from VB.
|||Use ADO in VB6, ADO.net with VB.net.
As previously mentioned by MSVP, run the db creation in your command text object
Adamus
|||Wait...you can't USE a db to CREATE a db?Ayhan Yerli wrote:
can i run such a transact SQL script with VB
use master
go
create database Ayhandeneme
on (Name=AyhanDeneme_Dat, FileName='c:ayhandeneme.mdf')
go
What are you trying to do?
Adamus
No comments:
Post a Comment