LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

mySQL and SQL Toolkit 2.0

Solved!
Go to solution

Hello, 

 

I'm using a mySQL database and the sql toolkit  2.0 in a CVI Labwindows application. 

 

I have a problem when the database increases in size. Indeed, when the number of records reaches 3 millions, the program memory is 1.7 Go. So, it stops on a Out of Memory error. 

The program memory increases when I use the function DBActivateMap, before adding records. 

 

For the moment, I'm using the following method for adding records :

 

  DBBeginMap

 

DBMapColumnToDouble

DBMapColumnToDouble 

...

 

DBActivateMap 

 

DBCreateRecord

  DBPutRecord

 

Is there an other possibility to open the table and add records ? 

 

Thank you for your help.

 

Benjamin 

0 Kudos
Message 1 of 5
(4,464 Views)

Hi Benjamin,

 

I do not think that this is a question of suitable commands but rather of a 32 bit operating system, where maximum memory is 2 GB.

Message 2 of 5
(4,453 Views)

Thank you for your answer. 

 

I think too that with a 64bit os, the number max of records will increase. 

But for the moment, it isn't possible to change for this OS.

 

I think it's strange that  for adding one record to a 3 million record table, the memory available must be upper than 2GB !

That's why I think it is possible I don't use the best commands. 

 

0 Kudos
Message 3 of 5
(4,446 Views)
Solution
Accepted by topic author Benjamin.J

Hello,

 

Did you try to use directly sql statement in order to insert a data, for that you can use this function:

DBActivateSQL

 

And for the sql statement you can use that :

 

INSERT [INTO] table [(colums)]
{VALUES (list_of_value) | requête_select | DEFAULT VALUES }
 

Regards,

Nacer M. | Certified LabVIEW Architecte

Message 4 of 5
(4,379 Views)

Hello.

 

Thank you for your help.

 

I don't use DBActivateSQL, but DBImmediateSQL, with a SQL Statement, and it's working very well. Now, it is not necessary to load the database, so it is faster. Thank you very much. 

 

Best regards,

 

Benjamin 

0 Kudos
Message 5 of 5
(4,283 Views)