Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Sybase OleDB connection help [modified]

Sybase OleDB connection help [modified]

Scheduled Pinned Locked Moved Database
databasecomhelpcsharpjava
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    devvvy
    wrote on last edited by
    #1

    Hi - I'm wasting a lot of time trying to get connection right to Sybase and didn't manage to get the combination/configuration right.. very nice if someone can help here! In my sql.ini file under here C:\...\Sybase\ocnt1252\ini: ... many entries [UATMACHINE] somesrv.data.com,4300 somesrv.data.com,4300 ... many more entries ... Now, connection string = "Provider=Sybase ASE OLE DB Provider;Data Source=UATMACHINE;Server Name=somesrv.data.com,4300;Database=MyDB;User ID=johdoe;Password=xxx;" http://www.carlprothman.net/Default.aspx?tabid=86[^] And when I stepped through the code, it failed on oConn.Open with this erro: [System.InvalidOperationException] = {"The 'Sybase ASE OLE DB Provider' provider is not registered on the local machine."} Also tried this: "Provider=Sybase.ASEOLEDBProvider;Server Name=somesrv.data.com,4300;Initial Catalog=MyDB;User ID=johdoe;Password=xxx;" http://www.devlist.com/ConnectionStringsPage.aspx[^][^] Same error. These reference seems to be suggesting I should: (a) Use ASE ADO.NET Data Provider (i.e. Provider=ASAProv.90) instead (b) download ASE ADO.NET Data Provider REF[^] (c) Instead of generic "new DbConnection()" I'm using now (trying to abstract away DAL), I should be using OleDbConnection new OleDbConnection[^] Actually this is quite inconvenient as my connection code looks like this: DbProviderFactory oDbProviderFactory = CDataUtil.GetConnectionFactory("System.Data.OleDb");

    A 1 Reply Last reply
    0
    • D devvvy

      Hi - I'm wasting a lot of time trying to get connection right to Sybase and didn't manage to get the combination/configuration right.. very nice if someone can help here! In my sql.ini file under here C:\...\Sybase\ocnt1252\ini: ... many entries [UATMACHINE] somesrv.data.com,4300 somesrv.data.com,4300 ... many more entries ... Now, connection string = "Provider=Sybase ASE OLE DB Provider;Data Source=UATMACHINE;Server Name=somesrv.data.com,4300;Database=MyDB;User ID=johdoe;Password=xxx;" http://www.carlprothman.net/Default.aspx?tabid=86[^] And when I stepped through the code, it failed on oConn.Open with this erro: [System.InvalidOperationException] = {"The 'Sybase ASE OLE DB Provider' provider is not registered on the local machine."} Also tried this: "Provider=Sybase.ASEOLEDBProvider;Server Name=somesrv.data.com,4300;Initial Catalog=MyDB;User ID=johdoe;Password=xxx;" http://www.devlist.com/ConnectionStringsPage.aspx[^][^] Same error. These reference seems to be suggesting I should: (a) Use ASE ADO.NET Data Provider (i.e. Provider=ASAProv.90) instead (b) download ASE ADO.NET Data Provider REF[^] (c) Instead of generic "new DbConnection()" I'm using now (trying to abstract away DAL), I should be using OleDbConnection new OleDbConnection[^] Actually this is quite inconvenient as my connection code looks like this: DbProviderFactory oDbProviderFactory = CDataUtil.GetConnectionFactory("System.Data.OleDb");

      A Offline
      A Offline
      ashishj016
      wrote on last edited by
      #2

      Hi Devvvy, i have a legacy code in VB.Net 1.1 and Sybase ASE 12.5, system is working fine as i took over from previous developer. Now client want to upgrade to ASE 15.7. we created a totally new environment and installed DB and ASE Client on new machines. I was getting Connection Error while connecting with new DB. I modified connection string in web.config Previous: <add key="connectionString" value="Provider=Sybase.ASEOLEDBProvider.2;Server Name=DBDV01;Initial Catalog=RLDB;Password=db_user;User ID=db_user;Server Port Address=4100;Persist Security Info=True" > </add> New: <add key="connectionString" value="Provider=ASEOLEDB;Server Name=DBDV01;Initial Catalog=RLDB;Password=db_user;User ID=db_user;Server Port Address=4100;Persist Security Info=True" > </add> Login works fine however just after Login when system tries to run any other query in database I get following error message: [Message Class: 14][Message State: 1][Transaction State: 1][Server Name: DBDV01] [Native Code: 924] [ASEOLEDB]Database 'RLDB' is already open and can only have one user at a time. [Message Class: 11][Message State: 1][Transaction State: 1][Server Name: DBDV01] [Native Code: 4001][ASEOLEDB]Cannot open default database 'RLDB'. [Message Class: 10][Message State: 1][Transaction State: 1][Server Name: DBDV01] [Native Code: 5704][ASEOLEDB]Changed client character set setting to 'iso_1'. [Message Class: 10][Message State: 2][Transaction State: 1][Server Name: DBDV01] [Native Code: 5701][ASEOLEDB]Changed database context to 'master'. [Message Class: 10][Message State: 1][Transaction State: 1][Server Name: DBDV01] [Native Code: 5703][ASEOLEDB]Changed language setting to 'us_english'. I am also getting similar error if i try to open both SYBASE CENTRAL and SQL ADVANTAGE at the same time. any help will be welcome.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups