Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: dot sql file


Message #1 by "John Sen Yong" <yjohns@t...> on Mon, 23 Apr 2001 00:28:33 +0800
thanx for ur response...

r u mean that

below every GO, i have to put the conectionstring?

for ex,



if exists (select * from sysobjects where id = object_id('dbo.CUFeedback')

and sysstat & 0xf = 3)

 drop table dbo.CUFeedback

GO

"Provider=SQLOLEDB;Persist Security Info=False;" & _

               "User ID=sa;Initial Catalog=travel;" & Data Source=mike"



am i correct?





----- Original Message -----

From: Thor Burfine <tburfine@k...>

To: ASP Databases <asp_databases@p...>

Sent: Wednesday, April 18, 2001 10:54 PM

Subject: [asp_databases] Re: how to connect to .sql





> If I am reading your question right...

> you have a file:

>     somthing.sql

> If this is the case you need to open SQL Server and execute the the script

> to create the database.

>

> The first line in the .sql file may look somthing like this (Open in note

> pad):

>

> if exists (select * from sysobjects where id = object_id(N'[dbo].

> [Annual_Driver_Review_UTrig]') and OBJECTPROPERTY(id, N'IsTrigger') = 1)

> drop trigger [dbo].[Annual_Driver_Review_UTrig]

> GO

>

> Then you need to decide if you want to use ADO or a DSN connection.

>

> Hope this helps.

> Thor

>

>

>

> > As i wanted to run an asp file, i find that there is no database with

> it..

> > it comes with sql file....

> > so how do i connect the sql file with my asp?

> > please help....











Message #2 by "Charles Feduke" <webmaster@r...> on Sun, 22 Apr 2001 18:54:57 -0400
    Didn't we do this one once already?



    No, you do not need to put the connection string after every GO.  GO

just causes a COMMIT in a basic sense.



- Chuck



----- Original Message -----

From: "John Sen Yong" <yjohns@t...>

To: "ASP Databases" <asp_databases@p...>

Sent: Sunday, April 22, 2001 12:28 PM

Subject: [asp_databases] dot sql file





> thanx for ur response...

> r u mean that

> below every GO, i have to put the conectionstring?

> for ex,

>

> if exists (select * from sysobjects where id = object_id('dbo.CUFeedback')

> and sysstat & 0xf = 3)

>  drop table dbo.CUFeedback

> GO

> "Provider=SQLOLEDB;Persist Security Info=False;" & _

>                "User ID=sa;Initial Catalog=travel;" & Data Source=mike"

>

> am i correct?




  Return to Index