|
 |
asp_databases thread: how to connect to .sql
Message #1 by "John Sen Yong" <yjohns@t...> on Thu, 19 Apr 2001 00:18:05 +0800
|
|
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 "Thor Burfine" <tburfine@k...> on Wed, 18 Apr 2001 22:54:58
|
|
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 #3 by "John Sen Yong" <yjohns@t...> on Thu, 19 Apr 2001 14:34:49 +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....
|
|
 |