Discussion:
Database Variant To Data memo
(too old to reply)
PJGCC1
2008-08-05 14:40:08 UTC
Permalink
I am tring to read back a memo field from a MS access database using labview 8.2's  Database vi "Database Variant To Data" with a string wired to the type terminal. I get an error message to say the data type is incorrect. Anyone got any ideas on how to read the memo field back.OS windows XPLabview 8.2MS Access 2000
mickeyw
2008-08-07 15:40:07 UTC
Permalink
Hi,
From initial research this seems like a common problem, as well as people not being able to place the variant to data icon on the block diagram.
I have attached some example code which may solve your problem. Have you tried unistalling and re-installing Labview and MAX? This should solve any corrupted installation issues. This <a href="http://digital.ni.com/public.nsf/allkb/CC1BE7AC3B5710F7862565BC006DE644?OpenDocument" target="_blank">KB</a>&nbsp;gives some direction on how to convert variant type, while&nbsp;this <a href="http://forums.ni.com/ni/board/message?board.id=170&amp;message.id=58903&amp;requireLogin=False" target="_blank">thread</a>&nbsp;is of a similar vein, and may be of some assistance in your application.
I wish you success with your application, let me know of any further problems.
Regards,


SQL_Variant[1].vi:
http://forums.ni.com/attachments/ni/170/347578/1/SQL_Variant[1].vi
PJGCC1
2008-08-08 07:40:06 UTC
Permalink
Mike
&nbsp;
Thanks for the information, firstly I could not open your vi&nbsp;as I am still using LV8.2, we can not afford the time to revalidate over a 1000 vis.
As far as the use of Database Variant to Data vi, I use it a lot, but the problem is that when you set a field within MS Access to Memo the DVtD vi (with string type) returns with an error the say wrong data type.
&nbsp;
The reason for using data type memo, is because access limits text to 255 characters.
&nbsp;
Peter
mickeyw
2008-08-08 09:10:11 UTC
Permalink
Hi Peter,
I have attached the VI again, but saved in 8.2. Let me know if you manage to open it and if it is useful. If not, we can go back to the drawing board. Was the other information helpful? Meanwhile, maybe you could send your code so I can have a look myself and see if I can solve the problem here. I am assuming you have the database connectivity toolkits installed? If not, this <a href="http://digital.ni.com/public.nsf/websearch/201483AB4CEDAFB68625702D0045AFB2?OpenDocument" target="_blank">KB</a>&nbsp;has the link for downloads, and more information about database connectivity. This <a href="http://digital.ni.com/public.nsf/allkb/F763AA1D7CD3C83D862568E8007C51CD?OpenDocument" target="_blank">KB</a>&nbsp;gives examples and instructions on using Labview to open an Access database.
I hope this is of some assistance. If the examples are in a later version of Labview, let me know and I can save to 8.2 and post them.
Regards,


SQL_Variant[1].vi:
http://forums.ni.com/attachments/ni/170/347796/1/SQL_Variant[1].vi
PJGCC1
2008-08-08 10:10:08 UTC
Permalink
Sorry Mike
&nbsp;
But your code is still seen as 8.5.
Yes I am using Database Connectivity Toolkit, .UDLs to link to the access database. I am reading &amp; writing data to the DB not trouble at all, but when reading the BinNoHistory memo field it objects. We have always had trouble in writing to a memo field (when inserting a new data record), we insert a small amont of data and then update it using the attached vi.
&nbsp;
Peter
I have attached the DB table &amp; Memo updating vi


dbase_write_memo field1.vi:
http://forums.ni.com/attachments/ni/170/347809/1/dbase_write_memo field1.vi


db3.mdb.txt:
http://forums.ni.com/attachments/ni/170/347809/2/db3.mdb.txt

Continue reading on narkive:
Loading...