Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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-21-2002 at 11:06 PM.

  • #2
    New Coder
    Join Date
    Jun 2002
    Location
    Pilipinas
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #4
    New Coder
    Join Date
    Jun 2002
    Location
    Vlaardingen, The Netherlands
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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
    %>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •