Visual Basic 5 with Informix CLI 2.5 
Author Message
 Visual Basic 5 with Informix CLI 2.5

I am trying to edit a field in an ODBC data source using Informix CLI 2.5
from a snippet of code written in Visual Basic 5.0.  The problem I am
running into is that every attempt I make to insert, or edit a field, I
receive an error that the database is read-only.  I do know I have insert &
edit  permissions with this user, as I can manually make changes from within
MS Access 97 using the same ODBC datasource and user name.  Any ideas?

Sub newpassword(password As String)
    Dim trend As Database, trend_member_key As Recordset

    informix$ = "ODBC;DSN=maestro;UID=user1;PWD=user;DATABASE=trend;"

    Set trend = Workspaces(0).OpenDatabase("", False, False, informix$)
    Set trend_member_key = trend.OpenRecordset("select * from member where
loginname='JOHN DOE';", dbOpenDynaset)
    trend_member_key.MoveLast
    trend_member_key.MoveFirst

    trend_member_key.Edit
    trend_member_key![password] = password
    trend_member_key.Update
    trend_member_key.Close
    trend.Close
End Sub

Jason Bramble



Sun, 24 Dec 2000 03:00:00 GMT  
 Visual Basic 5 with Informix CLI 2.5

Quote:
>I am trying to edit a field in an ODBC data source using Informix CLI 2.5
>from a snippet of code written in Visual Basic 5.0.  The problem I am
>running into is that every attempt I make to insert, or edit a field, I
>receive an error that the database is read-only.

The most common cause of this message is when Visual Basic cannot find a
unique index for the table.  This may happen when you actually do not have a
unique index, when the solution is to add one (an Informix serial field, if
nothing else, will do the trick).  

It may also happen when the primary index is created as a constraint rather
than an actual index; the SQL used by some ODBC drivers to figure out
whether there is a unique index frequently does not take constraints into
account.
-----
William Harris



Mon, 25 Dec 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Visual Basic 5 with Informix CLI 2.5

2. INFORMIX-CLI with VB5

3. Problems with FoxPro/Visual Basic 6 with ADO 2.5

4. How can i use foxpro 2.5 files with visual basic

5. Visual Basic 4.0 16bit, Jet 2.5/3.0/3.5, MS-Access 7.0

6. Visual Basic 3.0 for Windows and Foxpro 2.5 for Windows database

7. Visual Basic 4.0 16 bit using Microsoft DAO 2.5 - ODBC SQL Passthrough

8. Oracle ODBC (Native) and Visual Basic ADO 2.5 Timeouts and Hanging Clients

9. ADO 2.5 'Unspecified Error' with Informix

10. register Informix database in Visual Basic

11. Visual Basic and Informix 4GL Opportunities

12. visual basic and Informix Universal Server

 

 
Powered by phpBB® Forum Software