Results 1 to 4 of 4

Thread: [RESOLVED] Connection using oledb and ADODB coding: Error...

  1. #1

    Thread Starter
    Lively Member George-LSA's Avatar
    Join Date
    May 2004
    Location
    Sydney, Australia
    Posts
    126

    Resolved [RESOLVED] Connection using oledb and ADODB coding: Error...

    Hey

    using the connection below i can connect to a database located on our SQL Server.

    when i change this connection to connect to a database on a SQLBase server it generates a runtime error. which states "multi-step oledb operating generated error. check each oledb status value. No work was done"

    the code for the sqlbase server is located below the sql server connection

    VB Code:
    1. 'SQL SERVER CONNECTION
    2. Private Sub Form_Load()
    3.     Set cn = New ADODB.Connection
    4.     Set rs = New ADODB.Recordset    'Create References and
    5.     Set ex = New Class1     'open database file
    6.  
    7.     cn.ConnectionString = "Provider=sqloledb;" & _
    8.                             "data source=vms2;" & _
    9.                             "Initial Catalog=ss638;" & _
    10.                             "uid=***;" & _
    11.                             "pwd=***"
    12.     cn.Open
    13.     ex.OpenRecordset rs, "PART", cn
    14.  
    15.     Set ex.ADORecordset = rs
    16.    
    17.     FileName
    18. End Sub

    VB Code:
    1. 'SQLBASE CONNECTION
    2. Private Sub Form_Load()
    3.     Set cn = New ADODB.Connection
    4.     Set rs = New ADODB.Recordset    'Create References and
    5.     Set ex = New Class1     'open database file
    6.  
    7.     cn.ConnectionString = "Provider=sqlbaseoledb;" & _
    8.                             "data source=servergs;" & _
    9.                             "Initial Catalog=vmfg638;" & _
    10.                             "uid=***;" & _
    11.                             "pwd=***"
    12.     cn.Open
    13.     ex.OpenRecordset rs, "PART", cn
    14.  
    15.     Set ex.ADORecordset = rs
    16.    
    17.     FileName
    18. End Sub

    can someone please tell me wat i am doing wrong...

    cheers
    Kind Regards,

    George S
    LSA Australia Pty Limited
    www.lsaa.com.au

    -----------------------------------------

    CCNA and CCNP certified
    Visual Basic 6 Developer
    -----------------------------------------
    Dont forget to Rate a post that Helped you
    And mark a post [RESOLVED] when your problem has been resolved.

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Connection using oledb and ADODB coding: Error...

    Here's an example of connectionstring for SQL Server....

    VB Code:
    1. 'Standard security:
    2. Provider=sqloledb;Data Source=Aron1;Initial Catalog=pubs;User Id=sa;Password=asdasd;
    3.  
    4. 'Trusted Connection:
    5. Provider=sqloledb;Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;

    On what line does the error occurs? Is it in the Ex.Openrecordset line?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3

    Thread Starter
    Lively Member George-LSA's Avatar
    Join Date
    May 2004
    Location
    Sydney, Australia
    Posts
    126

    Re: Connection using oledb and ADODB coding: Error...

    hey dee-u

    my sqlserver connection works....but the second connection string i provided didnt...that was for sqlbase....

    the error occured on
    VB Code:
    1. cn.Open

    do u have any ideas???
    Kind Regards,

    George S
    LSA Australia Pty Limited
    www.lsaa.com.au

    -----------------------------------------

    CCNA and CCNP certified
    Visual Basic 6 Developer
    -----------------------------------------
    Dont forget to Rate a post that Helped you
    And mark a post [RESOLVED] when your problem has been resolved.

  4. #4
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Connection using oledb and ADODB coding: Error...

    Try visiting this link.

    I know nothing about SQLBase so I couldnt provide you a good advice.... Sorry.....
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

Posting Permissions

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



Click Here to Expand Forum to Full Width