Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB Databases
|
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 20th, 2003, 12:12 PM
Registered User
 
Join Date: Aug 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to bpadmana Send a message via Yahoo to bpadmana
Default Add and Update Problem with ADO

hi,
    I using ADODB.connection and ADODB.recordset to access an Interbase database. I am using the Free Version of IBProvider (http://www.ibprovider.com/eng/trial.html). I get an error when perform addnew operation that states that "Current recordset doesnot support update. This might be a limitation of provider". I have tried out the suggessions provided (setting cursortype, location ..) and still getting the same error.

    I was wondering if it had something to do with this free version. If so it would great if some one can provide links to few available IBProviders.

I would appreciate any help in this issue !!

-bala

 
Old August 21st, 2003, 03:36 PM
Ned Ned is offline
Authorized User
 
Join Date: Jun 2003
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I usually use the following API to connect to interbase database.

Public Declare Function GetEnvironmentVariable Lib "kernel32" _
            Alias "GetEnvironmentVariableA" (ByVal lpName As String, _
                                            ByVal lpBuffer As String, _
                                            ByVal nSize As Long) As Long



Private sub GetData()
' Database environment variables
Dim iapDbase As String * 64
Dim retVal As Long
' database connection variables
Dim objConn As New ADODB.Connection
Dim objRS As New ADODB.Recordset


' Get environment variable: IAP_DATABASE
retVal = GetEnvironmentVariable("IAP_DATABASE", iapDbase, 64)
iapDbase = Left$(iapDbase, retVal)

' Create and open data connection using ADO
objConn.Open "Provider=ISG OLE DB DbS Provider;Data Source=" & Trim(iapDbase) & ";"
objRS.Open "Select * from Patient", objConn, adOpenForwardOnly, adLockReadOnly

'... all other code

End Sub

Cheers,

-Ned





Similar Threads
Thread Thread Starter Forum Replies Last Post
add new record to ADO recordset via stored proc tbullard Access 0 January 20th, 2006 02:35 PM
ADO record copy and add to table Freddyfred Access 2 February 16th, 2005 10:36 PM
ADO UPDATE Errors rborloz Pro VB Databases 0 January 20th, 2005 04:20 AM
ADO Command Update hcweb Classic ASP Basics 2 January 14th, 2004 06:55 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.