Sql Ole not connecting

Discussion in 'ASP .Net' started by Thomas Scheiderich, Apr 11, 2004.

  1. I get an error from trying to connect to my Sql6.5 server (which is why
    I am using Ole). It says the server doesn't exist or the password is
    wrong. I can't understand that because I use essetially the same
    connection scripts on my ASP pages and it works fine.

    Here is my ASP connection that works fine:

    *****************************************************************
    Set connectionToDatabase=Server.CreateObject("ADODB.Connection")
    connectionToDatabase.ConnectionTimeout = 60
    connectionToDatabase.Open "Provider=sqloledb;data source=steg;" & _
    "initial catalog=travdata;" & _
    "user id=sa;password="
    *****************************************************************

    Here is my aspx page (essentially):

    *****************************************************************
    <%@ Page Explicit="True" Language="VB" Debug="True" %>
    <%@ Import Namespace="System.Data" %>
    <%@ Import Namespace="System.Data.OleDb" %>

    <script runat="server">
    Dim ConnectString, SelectStatement As String
    Dim Connect As OleDbConnection = New OleDbConnection
    Dim Adapter As OledbDataAdapter = New OleDbDataAdapter
    Dim CmdBuilder As OleDbCommandBuilder
    Dim ds As DataSet = New DataSet
    Dim Row As DataRow

    Sub Page_Load(Sender As Object, E As EventArgs)
    If Not IsPostBack Then
    SelectStatement = "Select * From carriers"
    ConnectString = "Provider=SQLOLEDB;Data Source=steg;Initial
    Catalog=travdata;uid=sa;pwd="
    Connect.ConnectionString = ConnectString
    Adapter.SelectCommand = _
    new OleDbCommand(SelectStatement, Connect)
    CmdBuilder = New OleDbCommandBuilder(Adapter)
    Adapter.Fill(ds,"carriers")
    end if
    end sub
    </script>
    *****************************************************************

    The error I get is:

    *****************************************************************
    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
    access denied.
    Description: An unhandled exception occurred during the execution of the
    current web request. Please review the stack trace for more information
    about the error and where it originated in the code.

    Exception Details: System.Data.OleDb.OleDbException:
    [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
    access denied.

    Source Error:


    Line 41: new OleDbCommand(SelectStatement, Connect)
    Line 42: CmdBuilder = New OleDbCommandBuilder(Adapter)
    Line 43: Adapter.Fill(ds,"carriers")
    Line 44: end if
    Line 45: end sub


    Source File: c:\inetpub\wwwroot\itineraryTS.aspx Line: 43

    Stack Trace:


    [OleDbException (0x80004005): [DBNETLIB][ConnectionOpen (Connect()).]SQL
    Server does not exist or access denied.]
    System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20
    System.Data.OleDb.OleDbConnection.InitializeProvider() +57
    System.Data.OleDb.OleDbConnection.Open() +203
    System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
    ConnectionState& originalState) +44
    System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
    startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
    CommandBehavior behavior) +304
    System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
    startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
    CommandBehavior behavior) +77
    System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
    srcTable) +36
    ASP.itineraryTS_aspx.Page_Load(Object Sender, EventArgs E) in
    c:\inetpub\wwwroot\itineraryTS.aspx:43
    System.Web.UI.Control.OnLoad(EventArgs e) +67
    System.Web.UI.Control.LoadRecursive() +35
    System.Web.UI.Page.ProcessRequestMain() +731
    *****************************************************************

    I know the server exists and so does the access. What am I missing?

    Thanks,

    Tom.
    Thomas Scheiderich, Apr 11, 2004
    #1
    1. Advertising

  2. I found out that it seems to be a problem with Sql 6.5 as if I change

    "Source=steg" to "Source=(local)" or "Source=allosaurus"

    Both the local and Allosaurus remote server are running Sql 7.0.

    This was the reason I didn't use SqlConnection because I was using 6.5
    and I was told that SqlConnection only worked with 7.0 and above. If I
    was going to use 6.5, I needed to use OLE, which I did.

    Obviously, the machine is seeing it as my ASP page works.

    Tom.

    Thomas Scheiderich wrote:

    > I get an error from trying to connect to my Sql6.5 server (which is why
    > I am using Ole). It says the server doesn't exist or the password is
    > wrong. I can't understand that because I use essetially the same
    > connection scripts on my ASP pages and it works fine.
    >
    > Here is my ASP connection that works fine:
    >
    > *****************************************************************
    > Set connectionToDatabase=Server.CreateObject("ADODB.Connection")
    > connectionToDatabase.ConnectionTimeout = 60
    > connectionToDatabase.Open "Provider=sqloledb;data source=steg;" & _
    > "initial catalog=travdata;" & _
    > "user id=sa;password="
    > *****************************************************************
    >
    > Here is my aspx page (essentially):
    >
    > *****************************************************************
    > <%@ Page Explicit="True" Language="VB" Debug="True" %>
    > <%@ Import Namespace="System.Data" %>
    > <%@ Import Namespace="System.Data.OleDb" %>
    >
    > <script runat="server">
    > Dim ConnectString, SelectStatement As String
    > Dim Connect As OleDbConnection = New OleDbConnection
    > Dim Adapter As OledbDataAdapter = New OleDbDataAdapter
    > Dim CmdBuilder As OleDbCommandBuilder
    > Dim ds As DataSet = New DataSet
    > Dim Row As DataRow
    >
    > Sub Page_Load(Sender As Object, E As EventArgs)
    > If Not IsPostBack Then
    > SelectStatement = "Select * From carriers"
    > ConnectString = "Provider=SQLOLEDB;Data Source=steg;Initial
    > Catalog=travdata;uid=sa;pwd="
    > Connect.ConnectionString = ConnectString
    > Adapter.SelectCommand = _
    > new OleDbCommand(SelectStatement, Connect)
    > CmdBuilder = New OleDbCommandBuilder(Adapter)
    > Adapter.Fill(ds,"carriers")
    > end if
    > end sub
    > </script>
    > *****************************************************************
    >
    > The error I get is:
    >
    > *****************************************************************
    > Server Error in '/' Application.
    > --------------------------------------------------------------------------------
    >
    >
    > [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
    > access denied.
    > Description: An unhandled exception occurred during the execution of the
    > current web request. Please review the stack trace for more information
    > about the error and where it originated in the code.
    >
    > Exception Details: System.Data.OleDb.OleDbException:
    > [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
    > access denied.
    >
    > Source Error:
    >
    >
    > Line 41: new OleDbCommand(SelectStatement, Connect)
    > Line 42: CmdBuilder = New OleDbCommandBuilder(Adapter)
    > Line 43: Adapter.Fill(ds,"carriers")
    > Line 44: end if
    > Line 45: end sub
    >
    >
    > Source File: c:\inetpub\wwwroot\itineraryTS.aspx Line: 43
    >
    > Stack Trace:
    >
    >
    > [OleDbException (0x80004005): [DBNETLIB][ConnectionOpen (Connect()).]SQL
    > Server does not exist or access denied.]
    > System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20
    > System.Data.OleDb.OleDbConnection.InitializeProvider() +57
    > System.Data.OleDb.OleDbConnection.Open() +203
    > System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
    > ConnectionState& originalState) +44
    > System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
    > startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
    > CommandBehavior behavior) +304
    > System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
    > startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
    > CommandBehavior behavior) +77
    > System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
    > srcTable) +36
    > ASP.itineraryTS_aspx.Page_Load(Object Sender, EventArgs E) in
    > c:\inetpub\wwwroot\itineraryTS.aspx:43
    > System.Web.UI.Control.OnLoad(EventArgs e) +67
    > System.Web.UI.Control.LoadRecursive() +35
    > System.Web.UI.Page.ProcessRequestMain() +731
    > *****************************************************************
    >
    > I know the server exists and so does the access. What am I missing?
    >
    > Thanks,
    >
    > Tom.
    >
    Thomas Scheiderich, Apr 11, 2004
    #2
    1. Advertising

  3. Thomas Scheiderich

    Mary Chipman Guest

    You may have got it running, but you really ought to fix the huge
    security hole you've dug for yourself by using the sa login with no
    password. Although it doesn't address the older versions of SQL
    Server, the asp.net security best practices white paper is worth a
    read:
    http://www.microsoft.com/downloads/release.asp?ReleaseID=44047

    --Mary

    On Sat, 10 Apr 2004 18:29:05 -0700, Thomas Scheiderich
    <> wrote:

    >I found out that it seems to be a problem with Sql 6.5 as if I change
    >
    >"Source=steg" to "Source=(local)" or "Source=allosaurus"
    >
    >Both the local and Allosaurus remote server are running Sql 7.0.
    >
    >This was the reason I didn't use SqlConnection because I was using 6.5
    >and I was told that SqlConnection only worked with 7.0 and above. If I
    >was going to use 6.5, I needed to use OLE, which I did.
    >
    >Obviously, the machine is seeing it as my ASP page works.
    >
    >Tom.
    >
    >Thomas Scheiderich wrote:
    >
    >> I get an error from trying to connect to my Sql6.5 server (which is why
    >> I am using Ole). It says the server doesn't exist or the password is
    >> wrong. I can't understand that because I use essetially the same
    >> connection scripts on my ASP pages and it works fine.
    >>
    >> Here is my ASP connection that works fine:
    >>
    >> *****************************************************************
    >> Set connectionToDatabase=Server.CreateObject("ADODB.Connection")
    >> connectionToDatabase.ConnectionTimeout = 60
    >> connectionToDatabase.Open "Provider=sqloledb;data source=steg;" & _
    >> "initial catalog=travdata;" & _
    >> "user id=sa;password="
    >> *****************************************************************
    >>
    >> Here is my aspx page (essentially):
    >>
    >> *****************************************************************
    >> <%@ Page Explicit="True" Language="VB" Debug="True" %>
    >> <%@ Import Namespace="System.Data" %>
    >> <%@ Import Namespace="System.Data.OleDb" %>
    >>
    >> <script runat="server">
    >> Dim ConnectString, SelectStatement As String
    >> Dim Connect As OleDbConnection = New OleDbConnection
    >> Dim Adapter As OledbDataAdapter = New OleDbDataAdapter
    >> Dim CmdBuilder As OleDbCommandBuilder
    >> Dim ds As DataSet = New DataSet
    >> Dim Row As DataRow
    >>
    >> Sub Page_Load(Sender As Object, E As EventArgs)
    >> If Not IsPostBack Then
    >> SelectStatement = "Select * From carriers"
    >> ConnectString = "Provider=SQLOLEDB;Data Source=steg;Initial
    >> Catalog=travdata;uid=sa;pwd="
    >> Connect.ConnectionString = ConnectString
    >> Adapter.SelectCommand = _
    >> new OleDbCommand(SelectStatement, Connect)
    >> CmdBuilder = New OleDbCommandBuilder(Adapter)
    >> Adapter.Fill(ds,"carriers")
    >> end if
    >> end sub
    >> </script>
    >> *****************************************************************
    >>
    >> The error I get is:
    >>
    >> *****************************************************************
    >> Server Error in '/' Application.
    >> --------------------------------------------------------------------------------
    >>
    >>
    >> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
    >> access denied.
    >> Description: An unhandled exception occurred during the execution of the
    >> current web request. Please review the stack trace for more information
    >> about the error and where it originated in the code.
    >>
    >> Exception Details: System.Data.OleDb.OleDbException:
    >> [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
    >> access denied.
    >>
    >> Source Error:
    >>
    >>
    >> Line 41: new OleDbCommand(SelectStatement, Connect)
    >> Line 42: CmdBuilder = New OleDbCommandBuilder(Adapter)
    >> Line 43: Adapter.Fill(ds,"carriers")
    >> Line 44: end if
    >> Line 45: end sub
    >>
    >>
    >> Source File: c:\inetpub\wwwroot\itineraryTS.aspx Line: 43
    >>
    >> Stack Trace:
    >>
    >>
    >> [OleDbException (0x80004005): [DBNETLIB][ConnectionOpen (Connect()).]SQL
    >> Server does not exist or access denied.]
    >> System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20
    >> System.Data.OleDb.OleDbConnection.InitializeProvider() +57
    >> System.Data.OleDb.OleDbConnection.Open() +203
    >> System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
    >> ConnectionState& originalState) +44
    >> System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
    >> startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
    >> CommandBehavior behavior) +304
    >> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
    >> startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
    >> CommandBehavior behavior) +77
    >> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
    >> srcTable) +36
    >> ASP.itineraryTS_aspx.Page_Load(Object Sender, EventArgs E) in
    >> c:\inetpub\wwwroot\itineraryTS.aspx:43
    >> System.Web.UI.Control.OnLoad(EventArgs e) +67
    >> System.Web.UI.Control.LoadRecursive() +35
    >> System.Web.UI.Page.ProcessRequestMain() +731
    >> *****************************************************************
    >>
    >> I know the server exists and so does the access. What am I missing?
    >>
    >> Thanks,
    >>
    >> Tom.
    >>
    Mary Chipman, Apr 11, 2004
    #3
  4. Mary Chipman wrote:

    > You may have got it running, but you really ought to fix the huge
    > security hole you've dug for yourself by using the sa login with no
    > password. Although it doesn't address the older versions of SQL
    > Server, the asp.net security best practices white paper is worth a
    > read:
    > http://www.microsoft.com/downloads/release.asp?ReleaseID=44047



    I am not running on a production server, just a test machine. I
    normally have a different set of logins and passwords I use.

    I still can't figure out why Sql 6.5 won't work. It seems to be a
    problem with .net as my ASP works fine using the same settings (unless I
    am missing something).

    Thanks,

    Tom.

    >
    > --Mary
    >
    > On Sat, 10 Apr 2004 18:29:05 -0700, Thomas Scheiderich
    > <> wrote:
    >
    >
    >>I found out that it seems to be a problem with Sql 6.5 as if I change
    >>
    >>"Source=steg" to "Source=(local)" or "Source=allosaurus"
    >>
    >>Both the local and Allosaurus remote server are running Sql 7.0.
    >>
    >>This was the reason I didn't use SqlConnection because I was using 6.5
    >>and I was told that SqlConnection only worked with 7.0 and above. If I
    >>was going to use 6.5, I needed to use OLE, which I did.
    >>
    >>Obviously, the machine is seeing it as my ASP page works.
    >>
    >>Tom.
    >>
    >>Thomas Scheiderich wrote:
    >>
    >>
    >>>I get an error from trying to connect to my Sql6.5 server (which is why
    >>>I am using Ole). It says the server doesn't exist or the password is
    >>>wrong. I can't understand that because I use essetially the same
    >>>connection scripts on my ASP pages and it works fine.
    >>>
    >>>Here is my ASP connection that works fine:
    >>>
    >>>*****************************************************************
    >>>Set connectionToDatabase=Server.CreateObject("ADODB.Connection")
    >>>connectionToDatabase.ConnectionTimeout = 60
    >>>connectionToDatabase.Open "Provider=sqloledb;data source=steg;" & _
    >>>"initial catalog=travdata;" & _
    >>>"user id=sa;password="
    >>>*****************************************************************
    >>>
    >>>Here is my aspx page (essentially):
    >>>
    >>>*****************************************************************
    >>><%@ Page Explicit="True" Language="VB" Debug="True" %>
    >>><%@ Import Namespace="System.Data" %>
    >>><%@ Import Namespace="System.Data.OleDb" %>
    >>>
    >>><script runat="server">
    >>>Dim ConnectString, SelectStatement As String
    >>>Dim Connect As OleDbConnection = New OleDbConnection
    >>>Dim Adapter As OledbDataAdapter = New OleDbDataAdapter
    >>>Dim CmdBuilder As OleDbCommandBuilder
    >>>Dim ds As DataSet = New DataSet
    >>>Dim Row As DataRow
    >>>
    >>>Sub Page_Load(Sender As Object, E As EventArgs)
    >>> If Not IsPostBack Then
    >>> SelectStatement = "Select * From carriers"
    >>> ConnectString = "Provider=SQLOLEDB;Data Source=steg;Initial
    >>>Catalog=travdata;uid=sa;pwd="
    >>> Connect.ConnectionString = ConnectString
    >>> Adapter.SelectCommand = _
    >>> new OleDbCommand(SelectStatement, Connect)
    >>> CmdBuilder = New OleDbCommandBuilder(Adapter)
    >>> Adapter.Fill(ds,"carriers")
    >>> end if
    >>>end sub
    >>></script>
    >>>*****************************************************************
    >>>
    >>>The error I get is:
    >>>
    >>>*****************************************************************
    >>>Server Error in '/' Application.
    >>>--------------------------------------------------------------------------------
    >>>
    >>>
    >>>[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
    >>>access denied.
    >>>Description: An unhandled exception occurred during the execution of the
    >>>current web request. Please review the stack trace for more information
    >>>about the error and where it originated in the code.
    >>>
    >>>Exception Details: System.Data.OleDb.OleDbException:
    >>>[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
    >>>access denied.
    >>>
    >>>Source Error:
    >>>
    >>>
    >>>Line 41: new OleDbCommand(SelectStatement, Connect)
    >>>Line 42: CmdBuilder = New OleDbCommandBuilder(Adapter)
    >>>Line 43: Adapter.Fill(ds,"carriers")
    >>>Line 44: end if
    >>>Line 45: end sub
    >>>
    >>>
    >>>Source File: c:\inetpub\wwwroot\itineraryTS.aspx Line: 43
    >>>
    >>>Stack Trace:
    >>>
    >>>
    >>>[OleDbException (0x80004005): [DBNETLIB][ConnectionOpen (Connect()).]SQL
    >>>Server does not exist or access denied.]
    >>> System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20
    >>> System.Data.OleDb.OleDbConnection.InitializeProvider() +57
    >>> System.Data.OleDb.OleDbConnection.Open() +203
    >>> System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
    >>>ConnectionState& originalState) +44
    >>> System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
    >>>startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
    >>>CommandBehavior behavior) +304
    >>> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
    >>>startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
    >>>CommandBehavior behavior) +77
    >>> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
    >>>srcTable) +36
    >>> ASP.itineraryTS_aspx.Page_Load(Object Sender, EventArgs E) in
    >>>c:\inetpub\wwwroot\itineraryTS.aspx:43
    >>> System.Web.UI.Control.OnLoad(EventArgs e) +67
    >>> System.Web.UI.Control.LoadRecursive() +35
    >>> System.Web.UI.Page.ProcessRequestMain() +731
    >>>*****************************************************************
    >>>
    >>>I know the server exists and so does the access. What am I missing?
    >>>
    >>>Thanks,
    >>>
    >>>Tom.
    >>>
    >>>

    >
    Thomas Scheiderich, Apr 12, 2004
    #4
  5. Thomas Scheiderich

    Mary Chipman Guest

    Unfortunately it's been a while since I've had anything to do with
    6.5, and it also happens to not be supported any more :-( You might
    try posting on one of the public.sqlserver newsgroups in the hopes of
    finding someone still running it who might be able to help.

    --mary

    On Sun, 11 Apr 2004 16:06:09 -0700, Thomas Scheiderich
    <> wrote:

    >Mary Chipman wrote:
    >
    >> You may have got it running, but you really ought to fix the huge
    >> security hole you've dug for yourself by using the sa login with no
    >> password. Although it doesn't address the older versions of SQL
    >> Server, the asp.net security best practices white paper is worth a
    >> read:
    >> http://www.microsoft.com/downloads/release.asp?ReleaseID=44047

    >
    >
    >I am not running on a production server, just a test machine. I
    >normally have a different set of logins and passwords I use.
    >
    >I still can't figure out why Sql 6.5 won't work. It seems to be a
    >problem with .net as my ASP works fine using the same settings (unless I
    >am missing something).
    >
    >Thanks,
    >
    >Tom.
    >
    >>
    >> --Mary
    >>
    >> On Sat, 10 Apr 2004 18:29:05 -0700, Thomas Scheiderich
    >> <> wrote:
    >>
    >>
    >>>I found out that it seems to be a problem with Sql 6.5 as if I change
    >>>
    >>>"Source=steg" to "Source=(local)" or "Source=allosaurus"
    >>>
    >>>Both the local and Allosaurus remote server are running Sql 7.0.
    >>>
    >>>This was the reason I didn't use SqlConnection because I was using 6.5
    >>>and I was told that SqlConnection only worked with 7.0 and above. If I
    >>>was going to use 6.5, I needed to use OLE, which I did.
    >>>
    >>>Obviously, the machine is seeing it as my ASP page works.
    >>>
    >>>Tom.
    >>>
    >>>Thomas Scheiderich wrote:
    >>>
    >>>
    >>>>I get an error from trying to connect to my Sql6.5 server (which is why
    >>>>I am using Ole). It says the server doesn't exist or the password is
    >>>>wrong. I can't understand that because I use essetially the same
    >>>>connection scripts on my ASP pages and it works fine.
    >>>>
    >>>>Here is my ASP connection that works fine:
    >>>>
    >>>>*****************************************************************
    >>>>Set connectionToDatabase=Server.CreateObject("ADODB.Connection")
    >>>>connectionToDatabase.ConnectionTimeout = 60
    >>>>connectionToDatabase.Open "Provider=sqloledb;data source=steg;" & _
    >>>>"initial catalog=travdata;" & _
    >>>>"user id=sa;password="
    >>>>*****************************************************************
    >>>>
    >>>>Here is my aspx page (essentially):
    >>>>
    >>>>*****************************************************************
    >>>><%@ Page Explicit="True" Language="VB" Debug="True" %>
    >>>><%@ Import Namespace="System.Data" %>
    >>>><%@ Import Namespace="System.Data.OleDb" %>
    >>>>
    >>>><script runat="server">
    >>>>Dim ConnectString, SelectStatement As String
    >>>>Dim Connect As OleDbConnection = New OleDbConnection
    >>>>Dim Adapter As OledbDataAdapter = New OleDbDataAdapter
    >>>>Dim CmdBuilder As OleDbCommandBuilder
    >>>>Dim ds As DataSet = New DataSet
    >>>>Dim Row As DataRow
    >>>>
    >>>>Sub Page_Load(Sender As Object, E As EventArgs)
    >>>> If Not IsPostBack Then
    >>>> SelectStatement = "Select * From carriers"
    >>>> ConnectString = "Provider=SQLOLEDB;Data Source=steg;Initial
    >>>>Catalog=travdata;uid=sa;pwd="
    >>>> Connect.ConnectionString = ConnectString
    >>>> Adapter.SelectCommand = _
    >>>> new OleDbCommand(SelectStatement, Connect)
    >>>> CmdBuilder = New OleDbCommandBuilder(Adapter)
    >>>> Adapter.Fill(ds,"carriers")
    >>>> end if
    >>>>end sub
    >>>></script>
    >>>>*****************************************************************
    >>>>
    >>>>The error I get is:
    >>>>
    >>>>*****************************************************************
    >>>>Server Error in '/' Application.
    >>>>--------------------------------------------------------------------------------
    >>>>
    >>>>
    >>>>[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
    >>>>access denied.
    >>>>Description: An unhandled exception occurred during the execution of the
    >>>>current web request. Please review the stack trace for more information
    >>>>about the error and where it originated in the code.
    >>>>
    >>>>Exception Details: System.Data.OleDb.OleDbException:
    >>>>[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
    >>>>access denied.
    >>>>
    >>>>Source Error:
    >>>>
    >>>>
    >>>>Line 41: new OleDbCommand(SelectStatement, Connect)
    >>>>Line 42: CmdBuilder = New OleDbCommandBuilder(Adapter)
    >>>>Line 43: Adapter.Fill(ds,"carriers")
    >>>>Line 44: end if
    >>>>Line 45: end sub
    >>>>
    >>>>
    >>>>Source File: c:\inetpub\wwwroot\itineraryTS.aspx Line: 43
    >>>>
    >>>>Stack Trace:
    >>>>
    >>>>
    >>>>[OleDbException (0x80004005): [DBNETLIB][ConnectionOpen (Connect()).]SQL
    >>>>Server does not exist or access denied.]
    >>>> System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20
    >>>> System.Data.OleDb.OleDbConnection.InitializeProvider() +57
    >>>> System.Data.OleDb.OleDbConnection.Open() +203
    >>>> System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
    >>>>ConnectionState& originalState) +44
    >>>> System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
    >>>>startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
    >>>>CommandBehavior behavior) +304
    >>>> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
    >>>>startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
    >>>>CommandBehavior behavior) +77
    >>>> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String
    >>>>srcTable) +36
    >>>> ASP.itineraryTS_aspx.Page_Load(Object Sender, EventArgs E) in
    >>>>c:\inetpub\wwwroot\itineraryTS.aspx:43
    >>>> System.Web.UI.Control.OnLoad(EventArgs e) +67
    >>>> System.Web.UI.Control.LoadRecursive() +35
    >>>> System.Web.UI.Page.ProcessRequestMain() +731
    >>>>*****************************************************************
    >>>>
    >>>>I know the server exists and so does the access. What am I missing?
    >>>>
    >>>>Thanks,
    >>>>
    >>>>Tom.
    >>>>
    >>>>

    >>
    Mary Chipman, Apr 12, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Phillip Vong
    Replies:
    1
    Views:
    392
    Jose Rodriguez
    May 26, 2006
  2. Patrick.O.Ige

    Ole ole

    Patrick.O.Ige, Jul 16, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    480
    Patrick.O.Ige
    Jul 16, 2006
  3. Drew Pihera
    Replies:
    0
    Views:
    624
    Drew Pihera
    Feb 4, 2004
  4. =?Utf-8?B?TmVpbCBQYWRkb2Nr?=

    Connecting to SQL 2000 database with SQL 2005 tools installed

    =?Utf-8?B?TmVpbCBQYWRkb2Nr?=, May 2, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    396
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    May 2, 2007
  5. Lance Hoffmeyer
    Replies:
    0
    Views:
    231
    Lance Hoffmeyer
    Nov 17, 2003
Loading...

Share This Page