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



Wed, 18 Jun 1902 08: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



Wed, 18 Jun 1902 08:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Visual Basic 5 with Informix CLI 2.5

2. Problems with INFORMIX-CLI, INFORMIX-OnLine 5.x., Visual Basic 4, Win95

3. ODBC ASP Informix CLI 2.5 (32 bits)

4. Trouble with Informix 7.3 on Solaris and CLI 2.5

5. ODBC - INFORMIX-CLI 2.5 : cannot increase internal array size past 16000

6. Informix-cli 2.5

7. informix-cli 2.5

8. Informix-CLI 2.5 installation help needed!

9. Is Informix SE 7.2/CLI 2.5 thread safe?

10. Informix CLI 2.5 and memoryproblems

11. INFORMIX-CLI 2.5 on AIX


 
Powered by phpBB® Forum Software