in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Problem connecting with sql 2005

Last post 04-07-2008 12:05 PM by mendezbytwo. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-04-2008 11:51 AM

    Problem connecting with sql 2005

    Hello i'm writting because now i'm migrating an app from using sql 2000 to sql 2005 express. This is a Web app that uses the C1WebReport control. The app works fine, execept for the reports. I mean, i can connect to sql 2005 through .net connection classes to retreive data for configuration and some other things. But the reports don't show when connecting to the same DB on the same server. This does NOT happen when using sql 2000.

     The error that i'm getting is the following:

    [DataAccessException: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

    Cannot open data source, please check ConnectionString and RecordSource properties.
    ConnectionString:
      Provider=SQLOLEDB.1;Persist Security Info=True;User ID=sa;Password=mypassword;Initial Catalog=CDR;Data Source=(local)
    RecordSource:
      BILLING_GENERAL('20070406 00:00:00', '20070406 23:59:59')]

     [DataAccessException: Cannot open data source, please check ConnectionString and RecordSource properties.]
       C1.Win.C1Report.C1Report.aa(Exception A_0, Boolean A_1) +90
       C1.Win.C1Report.DataSource.m(Boolean A_0) +385
       C1.Win.C1Report.C1Report.k() +184
       C1.Win.C1Report.C1Report.r(ExportFilter A_0, Boolean A_1) +259
       C1.Win.C1Report.C1Report.RenderToFilter(ExportFilter filter) +15
       ln.d() +496
       C1.Web.C1WebReport.C1WebReport.set_CurrentPage(Int32 value) +30
       blgral.ParamsSetted(Object sender, EventArgs e) in c:\Inetpub\wwwroot\Abacus\blgral.aspx.cs:90
       OpenerWebCtl.DialogOpener.RaisePostBackEvent(String eventArgument) +77
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +174
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

    What should I need to do to correct this problem? is there something missing for connecting to sql 2005?

    I have SQL 2005 advanced express with sp2 (i haven't tested with other versions of 2005)

    Any help would be appreciated, i'm in a little hurry to solve this.

    Regards, Gabriel

  • 04-07-2008 10:04 AM In reply to

    Re: Problem connecting with sql 2005

    Hello Gabriel,
     
    It seems to me that your connection string is not correct. Please try using this format:
    connectionString="Data Source=(local)\sqlexpress;Initial Catalog=NORTHWIND;Integrated Security=False; User Id=SA; Password=password"
     
    I hope it works.
     
    Regards,
    Andrew
    <mendezbytwo> wrote in message news:203524@10.0.1.98...

    Hello i'm writting because now i'm migrating an app from using sql 2000 to sql 2005 express. This is a Web app that uses the C1WebReport control. The app works fine, execept for the reports. I mean, i can connect to sql 2005 through .net connection classes to retreive data for configuration and some other things. But the reports don't show when connecting to the same DB on the same server. This does NOT happen when using sql 2000.

     The error that i'm getting is the following:

    [DataAccessException: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

    Cannot open data source, please check ConnectionString and RecordSource properties.
    ConnectionString:
      Provider=SQLOLEDB.1;Persist Security Info=True;User ID=sa;Password=mypassword;Initial Catalog=CDR;Data Source=(local)
    RecordSource:
      BILLING_GENERAL('20070406 00:00:00', '20070406 23:59:59')]

     [DataAccessException: Cannot open data source, please check ConnectionString and RecordSource properties.]
       C1.Win.C1Report.C1Report.aa(Exception A_0, Boolean A_1) +90
       C1.Win.C1Report.DataSource.m(Boolean A_0) +385
       C1.Win.C1Report.C1Report.k() +184
       C1.Win.C1Report.C1Report.r(ExportFilter A_0, Boolean A_1) +259
       C1.Win.C1Report.C1Report.RenderToFilter(ExportFilter filter) +15
       ln.d() +496
       C1.Web.C1WebReport.C1WebReport.set_CurrentPage(Int32 value) +30
       blgral.ParamsSetted(Object sender, EventArgs e) in c:\Inetpub\wwwroot\Abacus\blgral.aspx.cs:90
       OpenerWebCtl.DialogOpener.RaisePostBackEvent(String eventArgument) +77
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +174
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

    What should I need to do to correct this problem? is there something missing for connecting to sql 2005?

    I have SQL 2005 advanced express with sp2 (i haven't tested with other versions of 2005)

    Any help would be appreciated, i'm in a little hurry to solve this.

    Regards, Gabriel



    http://helpcentral.componentone.com/cs/forums/p/74844/203524.aspx#203524

  • 04-07-2008 12:05 PM In reply to

    Re: Problem connecting with sql 2005

    Hi Andrew, thanks for your reply.

    I tried your connection string but i got this error

    An OLE DB Provider was not specified in the ConnectionString.  An example would be, 'Provider=SQLOLEDB;'.

    Also i tried this other connection string:

    Provider=SQLOLEDB.1;Persist Security Info=True;User ID=sa;Password=mypassword;Initial Catalog=mydb;Data Source=(local)\sqlexpress

    which gave me the same error as before

    [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

    I could only solve the problem using the name of the server instead of using "local", like this:

    Provider=SQLOLEDB.1;Persist Security Info=True;User ID=sa;Password=mypassword;Initial Catalog=mydb;Data Source=myservername

    (I didn't use instance name during the installation of sqlserver)

    I don't know if this is an issue on the version of the component i'm using, because as i explained in the previous post, i can connect to sqlexpress through .net classes with this connection string, as i did using sql 2000

    Persist Security Info=False;Initial Catalog=mydb;Server=.;User ID=sa;Password=mypassword

    Note: I have two connection strings in my web config file, one for .net and other for reports due to the "Provider" required item in the string for C1

     Do you have any comments on this?

    Regards, Gabriel.

Page 1 of 1 (3 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.