Server Access Denied

Discussion in 'ASP.NET Code Snips' started by manju, Sep 26, 2005.

  1. manju

    manju Guest

    hi,
    i am using following code for database connectivity of my .net application

    Dim a As New OleDb.OleDbConnection
    a.ConnectionString = "User ID=sa;Data Source=REPORTS;Tag with column collation when possible=False;Initial Catalog=e-TRACK;Use Procedure for Prepare=1;Auto Translate=True;Persist Security Info=False;Provider=SQLOLEDB.1;Workstation ID=MURALEE;Use Encryption for Data=False;Packet Size=4096;"
    a.Open()

    ********************************
    but i received the following error
    *************************


    Source Error:


    Line 44: Dim a As New OleDb.OleDbConnection
    Line 45: a.ConnectionString = "User ID=sa;Data Source=REPORTS;Tag with column collation when possible=False;Initial Catalog=e-TRACK;Use Procedure for Prepare=1;Auto Translate=True;Persist Security Info=False;Provider=SQLOLEDB.1;Workstation ID=MURALEE;Use Encryption for Data=False;Packet Size=4096;"
    Line 46: a.Open()
    Line 47: 'Put user code to initialize the page here
    Line 48: End Sub


    Stack Trace:


    [OleDbException (0x80004005): [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.]
    System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
    System.Data.OleDb.OleDbConnection.InitializeProvider()
    System.Data.OleDb.OleDbConnection.Open()
    WebApplication1.login_etrack.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\WebApplication1\login_etrack.aspx.vb:46
    System.Web.UI.Control.OnLoad(EventArgs e)
    System.Web.UI.Control.LoadRecursive()
    System.Web.UI.Page.ProcessRequestMain()

    ****************************************
    I 'VE CREATED TABLES IN A REMOTE SERVER,SO I THINK IT IS NOT A PROBLEM OF not being recognized on the remote machine.
    ANY BODY THERE TO HELP ME PLZZZZZZZZZZ

    WITH REGARDS,

    MANJU
  2. sonata

    sonata Perch

    Where do you specify the URI of the remote machine? I would expect to see "source=mssqln.mydomain.com;initial catalog=REPORTS;".

    Also, just curious as to why, if this is a SQL Server DB, you are using OLEDB classes instead of the SQL classes to connect.

Share This Page

JodoHost - 26,000 hosting end-users in 100 countries
Plesk Web Hosting
VPS Hosting
H-Sphere Web Hosting
Other Services