Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 06-22-2002, 12:03 AM   PM User | #1
ahmedsoliman
Regular Coder

 
Join Date: Jun 2002
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
ahmedsoliman is an unknown quantity at this point
access to SQL servse

i want to change database engin from access to SQL server,
is there will be many defferences or only the sql statment will be changed, and where can i find refrence to deal with asp using sql server

Last edited by ahmedsoliman; 06-22-2002 at 12:06 AM..
ahmedsoliman is offline   Reply With Quote
Old 06-22-2002, 10:15 AM   PM User | #2
ReyN
New Coder

 
Join Date: Jun 2002
Location: Pilipinas
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
ReyN is an unknown quantity at this point
If you are switching from using Access to SQL Server for an existing app, you definitely will have to make some changes, though not much.

The main change of course will be the connection string you use. And the rest are mostly slight differences in SQL statements, particularly when using wildcards and passing parameters.

For example, when using parameters, Access uses the question mark (?) , while SQL Server uses the @ symbol.
__________________
aspxtreme
ReyN is offline   Reply With Quote
Old 06-22-2002, 04:39 PM   PM User | #3
ahmedsoliman
Regular Coder

 
Join Date: Jun 2002
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
ahmedsoliman is an unknown quantity at this point
so ,all what i need is learning the sql server query statement,and put it instead of statment to query access. in addition to change the connection string. thank you,but if you have an examble asp file link to sql sever it will be good for me.
ahmedsoliman is offline   Reply With Quote
Old 06-22-2002, 11:12 PM   PM User | #4
Paardekam.nl
New Coder

 
Join Date: Jun 2002
Location: Vlaardingen, The Netherlands
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Paardekam.nl is an unknown quantity at this point
Lightbulb Different Connection strings for SQL-Server

Here you see 5 possible connection strings... As you can see I commented the first 4 of 'em. I use the last one most often. Just try for yourself... it's not that difficult!

<%
' ############################################
' ##
' ## Database-connection www.paardekam.nl
' ## (F)reeware 2002 - Robin Paardekam
' ##
' ############################################

'connstr = "PROVIDER=MSDASQL; DRIVER={SQL Server}; database=db_name; user id=sa; password=sa; server=ServerName;Trusted_Connection=yes; Network Library=dbmssocn"
'connstr = "DRIVER={SQL Server}; SERVER=ServerName; user id=sa; PASSWORD=sa; DATABASE=db_name"
'connstr = "PROVIDER=SQLOLEDB; network=DBMSSOCN; server=ServerName; user id=sa; password=sa; Trusted_Connection=yes; database=db_name"
'connstr = "DSN=dsnname;uid=sa;pwd=sa;DATABASE=db_name;APP=ASP Script"

connstr = "PROVIDER=SQLOLEDB; DATA SOURCE=ServerName; UID=sa; PWD=sa; DATABASE=db_name; Trusted_Connection=yes"

Set conn = Server.CreateObject("ADODB.Connection")
conn.open connstr
%>
Paardekam.nl is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:13 AM.

Home - Contact Us - Archives - Link to CF - Resources - Top 

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.