hi every body,
am dealing with a foxpro6 database and am having a hard time inserting into the memo field of the table. Save for retrieving from a memo field. Can someone tell me what the problem is? and how to solve it? am using vb6
Thanks for helping.
With con
.Provider = "MSDASQL"
.ConnectionString = "Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=" & Path & ";Exclusive=No;Collate=Machine;NULL=NO;DELETED=NO;BACKGROUNDFETCH=NO;"
.Open
End With
this is how i retrieve from the table. And i always get "null" from the the table. even though i've opened the table in foxpro and inserted details into the field. it still returns the "null" value.
Code:
Set rsNature = con.Execute("select * from Nature_surete order by id_nature")
txtCarac = Trim$(rsNature!carac)
And this is how i insert into. The code works fine. But nothing is inserted into the field. The field remains empty in the table after a successful insert into command.
Code:
con.Execute ("insert into Type_surete values('" & Trim$(txtCarac.Text) & "')")
I hope i was clear enough. If any other information is needed, please let me know. Am stuck.
Ok. The only thing I can see that I wouldn't do is to use the word "Path" as a variable; it's used in a lot of places so you might get problems. I would change it to something like dbPath.
Other than that, the VB syntax looks fine. You probably should post in the Foxpro forum and see if it's an issue with your connectionstring or something.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.