Web Analytics Made Easy -
StatCounter access to SQL servse - CodingForum

Announcement

Collapse
No announcement yet.

access to SQL servse

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new 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; Jun 21, 2002, 06:06 PM.

  • #2
    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

    Comment


    • #3
      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.

      Comment


      • #4
        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
        %>
        Check out http://webcam.paardekam.nl/ to see how I'm doing in The Netherlands.

        Comment

        Working...
        X