mySQL and SQL Toolkit 2.0
Hello
I use a database mySQL and sql toolkit 2.0 in application of Labwindows CVI.
I have a problem when the database increases in size. Indeed, when the number of records reached 3 million, the program memory is 1.7 GB. So, it stops on an Out of Memory error.
The program memory increases when I use the DBActivateMap function, before adding the records.
For now, I use the following method to add records:
DBBeginMap
DBMapColumnToDouble
DBMapColumnToDouble
...
DBActivateMap
DBCreateRecord
DBPutRecord
Will there be another opportunity to open the table and add records?
Thank you for your help.
Benjamin
Hello
Have you tried to use sql statement directly to y to insert a data, for this, you can use this function:
DBActivateSQL
And for the sql statement you can use:
Table INSERT [] [(GBA)]
{VALUES (list_of_value) | requete_select |} DEFAULT VALUES}
Kind regards
Tags: NI Software
Similar Questions
-
Database MySQL with SQL Toolkit
Hello
We use CVI 2012 and the SQL Toolkit 2.2 and we want to connect to a MySQL database.
The MySQL database has been created with MySQLServer. When we try to connect with the BD connection, we get an error.
How can connect us to the MySQL database?
What do we have to type in the connection string to the DB? What is the name of the database, the path to the database or anything else?
Have experience with the SQL toolkit?
Thanks in advance
Oliver
You must install the mysql odbc connector and then create an ODBC dns for your database.
Control Panel, administration, odbc
-
Library packed and SQL Toolkit
Hello
I have labview development studio and I did a few test software that runs a test and displays the results in a database.
I built the test functions in a library packed
Another company will use the library packed to test some pcb for us. The problem is that they do not have the database module in their labview and therefore article database of the code does not work.
Is there an enforcement program for the SQL Toolbox I can give them?
No, but you can replace them with these drivers and don't have to worry about toolboxes. Don't forget to read the discussion too - it will give you the other reasons why you're better off without the DCT. The download link for the current version of LV's on the last page of the discussion.
Mike...
-
Hello
I have to build an application using LabWindows 2010 and SQL Toolkit 2.2. Is there any function or dll or api availble so that I do not want to link in the ODBC Control Panel.?
Concerning
Umer
-
Hello
We use CVI 2012 and SQL Toolkit 2.2. Once a minute, we're looking a record for a special SQL database and we update the data in this leaflet. After update, let's close the database. Whenever we do this procedure that we see in the Task Manager which increases the memory needs of our program.
After a few minutes (20-30) we get an error message memory.
Anyone know if there is a problem to know or can someone help us?
Thanks in advance
Oliver
Here is a part of the code:
//
hdbc = DBConnect (DATABASE_STRING);//
HSQL = DBActivateSQL (hdbc, "' SELECT * FROM 'data_l01'" ");//
RW = DBBindColChar (hsql, SQL_DATE, 32, cDB_Date, & iDB_Date_State, "");
RW = DBBindColChar (hsql, SQL_TIME, 32, cDB_Time, & iDB_Time_State, "");
RW = DBBindColInt (hsql, SQL_SPEED, & iDB_Clock, & iDB_Clock_State);Flag, ob der entry found wurde loeschen
iFoundFlag = 0;Find the folder that we want to update
While ((rw = DBFetchNext (hsql)) == DB_SUCCESS)
{
//
If ((StrICmpWithoutSurrWhiteSpace (cDB_Date, cDate) == 0) &)
(StrICmpWithoutSurrWhiteSpace (cDB_Time, cTime) == 0))
{
Flag, ob der entry found wurde set
iFoundFlag = 1;
break;
}
} / / Ende von find the folder that we want to updateDaten uebernehmen
iDB_Clock = Mutec;Insert the record into the database
RW = DBPutRecord (hsql);//
RW = DBDeactivateSQL (hsql);//
RW = DBDisconnect (hdbc);Hi Oliver,.
To read your code, I understand that you open a connection to the database for each update that you want to run.
Usually I would advice you to open the database connection to the start once this reference until the program is closed instead of open every time.
This could potentially solve your problem.
Please let me know if that solves your problem.
Best regards
Raphael
-
Problem connecting SQL toolkit Win7
I use CVI 2013 and tto toolkit (2.2) of SQL to connect to a mySQL database. I can connect to properly using my development computer, but not with the target. Both computers are running 64-bit Windows 7 Professional (SP1). I used to start the 64-bit ODBC drivers (mysql-connector-odbc - 5.3.2 - win64.msi) on both machines. After I got hurt, I found an article in the Knowledge Base which indicated that I should probably use the 32-bit instead. So I deleted the drivers of the target and installed those 32-bit using odbcad32.exe found in Windows/SysWOW64. No change.
I use the sample browser2.prj project included with the SQL Toolkit (default: C:\Users\Public\Documents\National Instruments\CVI\samples\sql\apps) to test the functionality of the SQL tool. I create a distribution kit, including the runtime shared on the development computer and install it on the target. I traced the problem to the call of DBSources() - it returns a - 100 (who, the hand is not among the list of database error codes).
On both machines the ODBC drivers seem to work. I can get to the database using Panel-> administration-> Data Sources (ODBC) tools. Select the user DSN or system DSN database, and then click Configure open the MySQL Connector/ODBC Data Source Connection window. By clicking Test in this window will connect to the database.
If the problem seems to lie in the way that ICB connects to the database. I'm naïve now, any suggestions would be greatly appreciated.
Sorry if this is a stupid question:
Have you followed the instructions help-> Reference Library-> library Toolkit SQL-> SQL language reference-> distributing a SQL Toolkit executable or a DLL?
Or is it a mistake you get despite following these instructions?
-
Create a procedure SQL with SQL toolkit
Hello
I use the SQL Toolbox to get data from a MySQL database (using ODBC connectors).
I would like to automatically create a procedure on my DB when lauching my application software, so that I do not know there is when I use it.
But I can't figure out how to do with the SQL Toolbox.
Indeed, you try to run this script (which works by operating on MySQL workbench) returns the following error:
DELIMITER $$
CREATE DEFINER='indus'@'%' PROCEDURE ' FPY'(datetime IN START_DATETIME, IN END_DATETIME datetime)
BEGIN
CREATE a temporary table ListingUUT
(
UUT_SERIAL_NUMBER VARCHAR (127).
TEST_COUNTER INT,
DateTime TEST_TIME,
UUT_STATUS VARCHAR (32)
);CREATE a temporary table Stat_FPY
(
TESTED INT,
TESTED_ONCE INT,
REPORT / FLOAT
);INSERT INTO Stat_FPY VALUES (0,0,0).
INSERT INTO ListingUUT
(
SELECT
UUT_SERIAL_NUMBER, SUM (1), START_DATE_TIME, UUT_STATUS
OF booster_results.uut_result
WHERE START_DATE_TIME BETWEEN START_DATETIME AND END_DATETIME
UUT_SERIAL_NUMBER GROUP
ORDER BY DESC START_DATE_TIME
)
;END
-Online error-2147217900 took place at NI_Database_API.lvlib:Conn Execute.vi-> Untitled 1
Possible reasons:
ADO error: 0x80040E14
Exception occurred in the Microsoft OLE DB provider for ODBC drivers: [MySQL] [ODBC 5.2.a Driver] [mysqld - 5.6.10 - log] you have an error in your syntax SQL; consult the manual for your version of the MySQL server for the right syntax to use near ' DELIMITER $$CREATE DEFINER='indus'@'%' PROCEDURE ' FPY '(IN START_DATETIME datet' à la ligne 1 en NI_Database_API.lvlib:Conn Execute.vi-> sans titre 1)
An idea so that I can create the procedure?
Finally, give up on the creation of the procedure with SQL Toolkit functions.
In fact using exec.vi system to address directly the command-line mysql server...
-
Hello
We use the CVI 2012 and the last sql toolkit. We want to find and update the data in a mysql database. But we have the problem that we still get an error message.
Here's our code:
// -----------------------------------------------------------------------
initialisiert das SQL Toolkit
DBInit (DB_INIT_MULTITHREADED);
DBInit (DB_INIT_SINGLETHREADED);//
sprintf (String, "DSN = SYSTEM_DATABASE; Server = 127.0.0.1; Basis of data = backup_demo8; UID = root; PWD = admin");//
hdbc = DBConnect (String);//
HMAP = DBBeginMap (hdbc);//
RW = DBMapColumnToInt (hmap, 'speed', iSpeed, & iSpeedState);
RW = DBMapColumnToChar (hmap, "datetime", 32, cDateTime, & cDateTimeStat, "");Activate the map
HSTMT = DBActivateMap (hmap "plots");Find the folder that we want to update
While ((rw = DBFetchNext (hstmt)) == DB_SUCCESS)
{
//
If (StrICmpWithoutSurrWhiteSpace (cDateTime, ' 05:37 "" ") == 0)
break;
}//
iSpeed = 10;Insert the record into the database
RW = DBPutRecord (hstmt);//
RW = DBDeactivateMap (hmap);//
RW = DBDisconnect (hdbc);// -----------------------------------------------------------------------
When we call the cmd DBPutRecord we get the attached error message
Can someone help us?
Thanks in advance
Best regards
Oliver
Hello
I found a solution in the meantime:
The Board features seem to be the problem. A google search I found a few comments about similar problems.
Using the SQL functions activate 'normal', it runs.
Here is my solution:
// -----------------------------------------------------------------------
initialisiert das SQL Toolkit
DBInit (DB_INIT_MULTITHREADED);
DBInit (DB_INIT_SINGLETHREADED);//
sprintf (String, "DSN = SYSTEM_DATABASE; Server = 127.0.0.1; Basis of data = database_l01; UID = root; PWD = admin");//
hdbc = DBConnect (String);//
HSQL = DBActivateSQL (hdbc, "' SELECT * FROM 'data_l01'" ");//
RW = DBBindColChar (hsql, SQL_TIME, 32, cTime, & cTimeStat, "");
RW = DBBindColInt (hsql, SQL_SPEED, iSpeed, & iSpeedState);Find the folder that we want to update
While ((rw = DBFetchNext (hsql)) == DB_SUCCESS)
{
//
If (StrICmpWithoutSurrWhiteSpace (cTime, ' 05:34 "" ") == 0)
break;
}//
iSpeed = 15;Insert the record into the database
RW = DBPutRecord (hsql);//
RW = DBDeactivateSQL (hsql);//
RW = DBDisconnect (hdbc);// -----------------------------------------------------------------------
Thank you and Bravo to me :-D
Oliver
-
SQL toolkit connection problems on ICB
Hi all.
I wrote this post because I'm not able to find a solution for the problem of the Telegraph...
I have developed a program that uses SQL Toolkit, the CVI 9. I have access to a MS Access 97 database, using an ODBC (DSN = MyProgram) connection.
The program works well, on windows 7 and windows XP (windows xp is the operating system of the end user).
However, when I install the program on the pc to the end user (windows xp) and then create the DSN user on ODBC connections, I got an error during execution of the program. We mean the error is not possible to connect to the database (its the ODBC connection).
As I said, on the other machine, different, with windows xp, it works!
I'm a little lost. Do I need a special component installed to SQL Toolkit fine work?
The PC with XP where the application works, has the same applications installed as the end user's PC.
I tried to install on the end user the LabWindows CVI SQL Toolkit with pc, and I checked that when connecting to the DSN will be tried, I get "unknown error."
Help will be very appreciate!
Run it on pc without Sql toolkit, you must copy the cvidb32.dll into your your windows system32 folder.
-
With CVI SQL Toolkit, how to add the new variable param column in a table.
Dear all:
I used the CVI Sql toolkit to create a database, but now I don't know how to add a new column to a table in variable param.
I know, to add a column with the name of constant column could be down by below:
DBImmediateSQL ((hdbc, "alter table table1 add column1 char [100]");
But if Column1 is a param variablae how can I write the code? Please advise? It will be appreciated if you could give me an example.
Best regards!
HI -.
If you look at the parameters that you pass to the SQL function, you can see that the second parameter is a string constant. In your code, you can create an array of characters (string). You can then use sprintf to programmatically determine what will be the contents of this variable. In the function call, you can put the variable instead of the literal string, and you will have a customizable SQL statement.
Hope this helps-
John M
-
migration of data from mysql to sql server
Hi all
I would like to import the database MySQL in SQL Server 2008 and export MySQL database into a ".sql" file to import data in SQL Server.
Whenever I try to import data from MySQL, I get the error attached like a screenshot below.
Please let me know what can be done and how can I import data with all the tables in the order.
Kind regards
Shiva
Please check this answer of the dev, unfortunately migration of Foglight backend database between different types of databases only is not supported
There are solutions to help you get the same types of a Foglight backend databases
https://support.quest.com/SolutionDetail.aspx?ID=SOL42249
Golan
-
Hi all
I want to migrate from MySQL DB to SQL Server without loss of data. Is this possible?
See this link:
In general, it is possible to move easily between the embedded MySQL and more robust external MySQL, but moving between database types is generally accomplished by standing the new FMS next to existing and, if necessary, put a unifier in front of both.
-
Creating a DB link between mySQL and Oracle
How can I create a dblink in mySQL to display the data in a table in Oracle 10g?
Thank you
RoaldWhat is the OS of Oracle and MYSQL database?
You can check the following link
http://www.Pythian.com/news/1554/how-to-access-MySQL-from-Oracle-with-ODBC-and-SQL/ -
CFScript to create tables (using MySQL) and configure it to use InnoDB
I use a cfscript to create my database and the tables using MySQL, and I was able to DO this with success, accept that I'm having a problem. I want to put my tables use InnoDB instead of MyISAM. How to do this?
That's what I did:
< cfquery = 'test' datasource name = 'mydatasource' >
CREATE TABLE Test
(
Id int (11) NOT NULL auto_increment,
Name varchar (20) default NULL,
Tinyint (4) active default NULL,
PRIMARY KEY (Id)
); ENGINE = InnoDB DEFAULT CHARSET = latin;
< / cfquery >
But when I get an error when I run this script. That's what I get:
-You have an error in your SQL syntax; "check the manual for your version of the MySQL server for the right syntax to use near '; ENGINE = InnoDB DEFAULT CHARSET = latin1'.
I look and it's the right syntax. Any ideas what I am doing wrong?
Thanks for any help
AlfieNevermind, I figured it. I misspelled it.
ENGINE type = InnoDB... must be before the semicolon.
:)
-
I am interested to be a filter of Chebyshev of FPGA, it is listed in IPnet here and DFD toolkit is reported as the source. But I installed DFD toolkit and no new filter became available in a FPGA palette. Clicking on the name of filter in IPnet brings just by using Labview standard page for a block design (not for FPGAS). How can I get these filters in FPGA?
Hi Snamprogetti,
The filter screws will not be added to pallets under the target FPGA. Instead, you create the filter using the screws under your target PC. Then, once you have a fixed-point filter, you can generate code that filter FPGA using the DFD FXP Code Generator VI. You can also generate code of a filter that you saved on the disk by right-clicking on your FPGA target in a project and selecting Start IP generator. Select the type of filter you saved from the dialog box, and then follow the steps to use your filter on your FPGA.
For an example of how to design and create a filter for FPGA, see OR example Finder to help "find examples. "" "Then look under the Modules and Toolkits' Digital Filter Design ' Getting Started ' tutorials ' of a Filter.lvproj fixed-point Code generation. There is a Video that shows how to generate code FPGA using the generator Code VI.
For more information on the filter design process, see the design of a Fixed-point Filter.lvproj sample.
Maybe you are looking for
-
How to block numbers on iphone5s
How can I block the phone numbers on an iphone5s?
-
How the card SD fits in ES1 - 311?
How does the SD card fit in ES1 - 311, does it go in its entirety, or because it sticks out like the ES1-11? Also if I buy ES1 - 311 with only MEM memory there is slot for SSD/HDD inside? Thank you
-
How do I allow users without administrator privileges install fonts?
I need allow users to install fonts without administrator privileges. Googling landed a few eccentric tools, but this isn't an option... I can change the entries in registry, file & directory permissions, use Windows commands in batch scripts, etc.
-
Turning off Auto hide the Windows taskbar?
My taskbar will appear on the bottom of the screen when I first connect, but it goes away after a while. My husband locked the taskbar, but nothing changed so I just opened and disconnected and still no change it always disappears. Please help fix, I
-
My application requires gps permissions in order to run. How can I check to see if the application has permissions for gps and prompts the user to select Yes if the app hasn't already have this permission programmatically? Is this possible?