If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Problem updating recordset with myvbql

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-12-04, 06:24
jsandin jsandin is offline
Registered User
 
Join Date: Feb 2004
Posts: 2
Problem updating recordset with myvbql

Hello. First, sorry for me bad english.
I have a problem when i try to update a recorset in visual basic using myvbql.dll.
Well, when i make a select from a table only, i can move my recordset, update, etc... perfectly. But when i try to make a select from 2 or more tables, the consult works perfect: i can move, show all records, etc...
But when i try modify some record, and update it, i get an error message and the recordset DON'T update.
I do something like this:

SELECT DISTINCT tb1.nestudio as nestudio, tb1.nombre as nombre, tb1.suclientes as suclientes, tb2.Nombre as cnombre FROM obras AS tb1 LEFT OUTER JOIN clientes AS tb2 ON tb1.suclientes=tb2.idclientes ORDER BY nestudio

I show it in a form
.......
When something is modified, i do:

MyRS.Fields("nestudio").Value = Me.txtreferencia.Text
MyRS.Fields("nombre").Value = Me.txtnommaq1.Text
MyRS.Fields("cnombre").Value = Me.txtnommaq2.Text
.......
If (MyRS.Update < 1) Then MsgBox "I can't save your changes."

And i can't save the modifications made.

But if i only work with a simple table, everything work perfect.

Please, someone can HELP me?

Thank you.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On