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 > Pervasive.SQL > vb6 recordset update function for mkd database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-30-09, 09:52
raider102 raider102 is offline
Registered User
 
Join Date: Sep 2009
Posts: 3
vb6 recordset update function for mkd database

Hello,

I have created a recordset from Pervasive sql control center and a vb6 form. After that I have add a save button and typed this codes. LockType is BatchOptimistic and Cursor Location Use Client-side Cursor. I can see added records from datagrid when I push the save button. But when I close and reopen the form there isnt any record. It is not saving records to database(mkd file). There is no any error message. Thats very strange.

Is there anyone experienced a problem like that?


Private Sub cmdSave_Click()
With DataEnvironment1.rsRECORDSET
.AddNew
.Fields("FIELD1") = Me.DataCombo1.Text
.Fields("FIELD1") = Me.Text1.Text
.Update
End With
End Sub
Reply With Quote
  #2 (permalink)  
Old 09-30-09, 12:44
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 1,026
As posted elsewhere:
Quote:
Can you post the full connection string and the SQL used to generate the recordset?

One thing I noticed, you have two "FIELD1" assignments. You might check to make sure your fields are correct.
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
  #3 (permalink)  
Old 10-01-09, 01:44
raider102 raider102 is offline
Registered User
 
Join Date: Sep 2009
Posts: 3
Hello Mirtheil,

I have used DataEnvironment for connection. I looked to DataEnvironment settings for finding how can i see connection string but I cant find the string. If you want, I can send you the vb6 project.

Before I typed the dbforums forum, I changed my program codes to field1 for easy understand by forum users. But I have made a mistake during copy paste field1 to two field name. I forget to change second field name to field2. The two field names are different in the orjinal codes
Reply With Quote
  #4 (permalink)  
Old 10-02-09, 15:21
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 1,026
In my quick test, I can't get the DataEvironment to update fields at all but I get errors.
I usually don't use the DataEnvironment preferring the control coding the connection and recordset code myself.
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
  #5 (permalink)  
Old 10-05-09, 05:52
raider102 raider102 is offline
Registered User
 
Join Date: Sep 2009
Posts: 3
Thank you very much for your answers Mirtheil. I am sorry for my english.

Have a good day...
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On