Problem connecting to sql database

Results 1 to 2 of 2

Thread: Problem connecting to sql database

  1. #1
    Join Date
    Dec 1969

    Default Problem connecting to sql database

    I&#039ve developed my ASP on my local machine w/ Access2k. I upsized the database to SQL Server 7 and made some changes to my asp (SQL calls, mostly) to account for differences between Access & SQL. <BR><BR>I can connect to my db on my live server with SQL Server 7, but, I get the following message:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e37&#039 <BR><BR>[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name &#039Users&#039. <BR><BR>/datalink/orderssql.asp, line 829 <BR><BR>Users is a table in my DB. Here is my code:<BR><BR> SQL = "SELECT password, disabled FROM Users"<BR> SQL = SQL & " WHERE UserID= &#039" & user & "&#039"<BR> set conn = server.createobject("ADODB.Connection")<BR> "ordersSQL", "username", "pwd"<BR> set record=conn.execute(SQL)<BR><BR>DO I need to reference my tables in a different way when using SQL Server? The above code worked just fine with my Access DB.<BR><BR>Thanks in advance.

  2. #2
    Join Date
    Dec 1969

    Default RE: Problem connecting to sql database

    You are probably referencing the wrong database: When you setup your DSN did you tell it that you want to use a default Database?<BR><BR>You can also explicitly specify your database when you ask for a table like so: databasename.tablename

Posting Permissions

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