-
May 4th, 2014, 12:18 AM
#1
Thread Starter
Frenzied Member
saving record to database issue
I have this regular way of saving record to the mysql database which is below:
rs.AddNew
rs.Fields("empid") = empid.Text 'save employee id integer type
rs.Fields("empfp") = FPBlob 'save finger print mediumblob type
rs.Update
However, when I do the code above, on the blob data is saved and the employeeid is not saved.
When, I remove the saving of empfp on that code, the employeeid can now be saved.
Which means, I cannot save both record on this code.
What should I do?
-
May 4th, 2014, 01:08 AM
#2
Re: saving record to database issue
Is the database auto incrementing the records or are you assigning one manually for each record?
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
May 4th, 2014, 04:45 AM
#3
Thread Starter
Frenzied Member
Re: saving record to database issue
-
May 4th, 2014, 04:57 AM
#4
Member
Re: saving record to database issue
Have you tried (just in case of wrong conversion)?
Code:
rs.AddNew
rs.Fields("empid") = Val(empid.Text) 'save employee id integer type
rs.Fields("empfp") = FPBlob 'save finger print mediumblob type
rs.Update
Are you sure that BLOB field is saved?
BLOB data should go something like:
Code:
rs.AddNew
rs.Fields("empid") = Val(empid.Text)
rs.Fields("empfp").AppendChunk Null
rs.Fields("empfp").AppendChunk FPBlob
rs.Update
Last edited by goranvuc; May 4th, 2014 at 05:05 AM.
Reason: additional sample
-
May 4th, 2014, 05:09 AM
#5
Thread Starter
Frenzied Member
Re: saving record to database issue
the saving is ok if done individually but if done both, then only the blob is saved.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|