Problems in inserting data using db tools insert data.vi

Problems in inserting data using db tools insert data.vi

Post by user_ » Thu, 27 Sep 2007 16:10:12


Hi All,
 
As a part of my application,i have to include an option to copy the records from one table to another.
 
In this there are two options.
 
1) copy the records from one table to the another in the same database.it works and i did it using the sql   query "insert into.....selecct * from..."
 
2)Copy the records from the table in the database the user selected(it can be from a database residing in pendrive also)to the table in the default path(both the tables are having the same structure).I successfully copied the data from the other database the user selected to a 2D array.
 
But when i was trying to insert into the table in the default path i was getting an error related to "DB Tools Insert Data.vi"
Thinking that i can not insert the 2D array directly i have selected each row seperately(although it will be time consuming),but still it was giving me errors.
 
The error i was gettin is the following....
Exception occured in Microsoft JET Database Engine: Number of query values and destination fields are not the same. in Rec Create - Command.vi->Cmd Execute.vi->DB Tools Insert Data.vi->selecttable.vi->devMain Menu.vi
 
If i want to change the format of the data ...how can i?
Anybody got a sample vi which inserts into a table from a 2D array?
 
Is there any way to formulate a query  that inserts data to a table in a database fetching data from a table in another database
some what like.....................insert into dbfirst.mdb.table1 select * from dbsecond.mdb.table1
I believe it can not be done as access can not operate on multiple databases at the same time.
Or is it possible?
 
I am attaching a screen shot of my block diagram
 
Thanks in advance


DBTools Insert Data.doc:
http://www.yqcomputer.com/
 
 
 

Problems in inserting data using db tools insert data.vi

Post by user_ » Thu, 27 Sep 2007 17:10:05

Hi...
When i fed a cluster of all fieldsinside the for loop, its working.
But if there r 5000 records fetch each record,make cluster fed it to the data input of dbtoolsinsert data .vi...
taking long time so very slow.
Any better ideas?