LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

data base insert data missing

Solved!
Go to solution

hi,

      i am inserting the data continually in while loop using data base toolkit.missing some data insert table.and also form inserting data in array it will correct.

0 Kudos
Message 1 of 9
(2,970 Views)

hi,

       here i attached my programing image.

0 Kudos
Message 2 of 9
(2,964 Views)

There are some issues with your code.

  • The output of the Execute Query vi is not a connection reference, it is a recordset reference.
  • You need to close the recordset reference that is comming from the Execute Query vi.
  • You have output tunnels on the case structure and event structure set to "Use Default If Unwired". You will loose your connection to the database. You need to be sure to wire the output tunnels with the correct wires.

 

Do you get any errors on the error wire??

How does your sql queries to the database look like? could they have wrong/illigal values/format?

0 Kudos
Message 3 of 9
(2,939 Views)

hi,

       my quary form and code working fine...no error message come.only problem insert some data missing in table (ex i am insert 1 to 10 data but actually inserted 1,2,3,5,8,9,10) and  insertted in array  data 1 to 10 correct..

0 Kudos
Message 4 of 9
(2,931 Views)

Make the changes that I have pointed out.

Then try again.

 

What type of database are you connecting to ?

0 Kudos
Message 5 of 9
(2,928 Views)

hi,

        this is sub vi.i will closed connection in main vi.

 

 

          using sql server connection.

0 Kudos
Message 6 of 9
(2,915 Views)

It is okay that you close the connection to the database in the main vi, but you need to close the recordset that the Execute Query is generating.

 

You are not getting all errors that is happening in the while loop, only the last value of the error cluster is going out of the while loop.
If any errors has happend in one of the iterations of the while loop, that error will be overwritten in the next iteration, and you will loose the information about the error.
You can fix this by

  • Changing the error tunnels to a Shift Register.
  • Or changing the output tunnels to Indexing and the use a Merge Error, to get only the first error/one error out.
0 Kudos
Message 7 of 9
(2,901 Views)

ya correct, the following error will come.

                1).DB Tools Close Connection.vi->Untitled 1<ERR>Open recordset object.

 

          so don't know how to close recordset object.but i closed main vi DB tool closed connections.

0 Kudos
Message 8 of 9
(2,880 Views)
Solution
Accepted by topic author GokulGKM

You can do that with the "DB Tools Free Object.vi"

 

DB Free recordset.png

0 Kudos
Message 9 of 9
(2,856 Views)