Memory problem sql toolkit

Hi
we are using CVI 2012 and SQL Toolkit 2.2. Once a minute we are searching a SQL database for a special record and we update the data in this record. After updating we close the database. Each time we do this procedure we see in the taskmanager that the memory our program needs increases.
After a couple of minutes (20-30) we get a memory error message.
Does anybody know if this is a know problem or does anyone can help us?
Thanks in advance
Oliver
here is some 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 Eintrag gefunden wurde loeschen
    iFoundFlag = 0;
    // Find the record we want to update
    while((rw = DBFetchNext(hsql)) == DB_SUCCESS)
        if( (StrICmpWithoutSurrWhiteSpace(cDB_Date, cDate) == 0) &&
            (StrICmpWithoutSurrWhiteSpace(cDB_Time, cTime) == 0))
            // Flag, ob der Eintrag gefunden wurde setzen
            iFoundFlag = 1;
            break;
        } // Ende von Find the record we want to update
        // Daten uebernehmen
        iDB_Clock            = iClock;
        // Insert the record into the database
        rw = DBPutRecord(hsql);
        rw = DBDeactivateSQL(hsql);
        rw = DBDisconnect(hdbc);
Solved!
Go to Solution.

Hello Raphael,
yes I came to the same point.
Last week I was at our customer and I modified the code that the database will be opened only once during the startup and closed with the programm end. The access to the database is done in a thread.That means that the database is open the whole time.
After this modification there was no more problem with the leak of memory. I watched the taskmanager a long time but there was no more rising memory
Thanks a lot for your help.
greetings
Oliver

Similar Messages

  • SQL toolkit 2.2 Stored Procedure Memory Leaks

    Hi
    we are using CVI 2012 and SQL Toolkit 2.2. My db is "MySql 5.5.28" and I use "MySQL Connector/ODBC 5.2(w)"
    I use only stored procedure (with and without the output parameters).  If I call continuously a stored procedure,
    with Sql toolkit code, I have memory leaks!! 
    My code (without error handler) is:
    // iDbConnId is the handle of DBConnect() called when program starts
    iStmt = DBPrepareSQL(iDbConnId, "spGetPrData");
    DBSetStatementAttribute(iStmt, ATTR_DB_STMT_COMMAND_TYPE, DB_COMMAND_STORED_PROC);
    DBExecutePreparedSQL(iStmt);
    DBBindColLongLong(iStmt, 1, &llPrId, &lStatus1);
    DBBindColInt(iStmt, 2, &iIpPort, &lStatus2);
    while(DBFetchNext(iStmt) != DB_EOF)
        //get data
    DBClosePreparedSQL(iStmt);
    DBDiscardSQLStatement(iStmt);
    If I call the same stored procedure by sql code ("CALL spProcedure()")
    I don't have memory leaks!!
    The code is (without error handler):
    // iDbConnId is the handle of DBConnect() called when program starts
    iStmt = DBActivateSQL(iDbConnId, "CALL spGetPrData();");
    DBBindColLongLong(iStmt, 1, &llPrId, &lStatus1);
    DBBindColInt(iStmt, 2, &iIpPort, &lStatus2);
    while(DBFetchNext(iStmt) != DB_EOF)
        //get data
    DBDeactivateSQL (iStmt)
    It seems to me that the DBDeactivateSQL function free the memory correctly,
    while the functions DBClosePreparedSQL and DBDiscardSQLStatement do not release properly the memory,
    (or I use improperly the library functions!!!)
    I also have a question to ask:
    Can I open and close the connection every time I connect to the database or is it mandatory to open and close it just one time?
    How can I check the status of the database connection, if is mandatory to open and close the db connection just one time?
    Thanks for your help.
    Best Regards
    Patrizio

    Hi,
    one of the functions "DBClosePreparedSQL and DBDiscardSQLStatement" is a known problem. In fact, there is a CAR (Corrective Action Request 91490) reporting the problem. What version of the toolkit are you using?
    About this function you refer to the manual:
    http://digital.ni.com/manuals.nsf/websearch/D3DF4019471D3A9386256B3C006CDC78
    Where functions are described. To avoid memory leaks DBDeactivateSQL must be used. DBDeactivateSQL is equivalent to calling DBCloseSQLStatement, then DBDiscardSQLStatement. DBDeativateSQL will work at all for parameterized SQL, as well.
    Regarding the connection mode advice to you is to open the connection once and close it at the end of your operations. What do you mean with "state of the database connection"? Remember that if you have connection problems or something goes wrong, the errors appears in any point in your code where you query the database. Bye
    Mario

  • SQL Toolkit -- problem searching Date/Time field in Access

    I have got an application where I need to query a database (Access) between
    two dates (usually the same date, a couple of hours apart). I have set up
    the date field within Access as a 'General Date' but can't seem to get the
    right format on the SQL query. I am always getting some error. I enclose
    the date with {}, '', [], and () (and anything else I can think of) and I
    still get a problem. It is now to the point where I think it might be a
    problem with SQL Toolkit and Access working together.
    I tried making the Date field into a string field (instead of a Date field),
    but I can't search between time (I can search between dates, but not date
    and time i.e. MM/DD/YY 00:00:00).
    Any ideas?

    Sorry, the database type is Access.
    I just tried the following query SELECT * FROM ValveMeritData WHERE MeritTestDateTime >= '2006/05/01 13:24:28'
    and SELECT * FROM ValveMeritData WHERE MeritTestDateTime >= '2006/05/01'  (which gave a data mismatch error).
    I am going to try the query in access now.  I had pretty good success with other types of queries, just writing them in
    Labview and testing.
    Any other suggestions?

  • SQL toolkit Win7 connection problem

    I'm using CVI 2013 and the SQL toolkit (2.2) tto connect to a mySQL database.  I can connect fine using my development computer, but not with the target one.  Both computers are running 64-bit Windows 7 Professional (SP1).  I was initially using the 64-bit ODBC drivers (mysql-connector-odbc-5.3.2-win64.msi) on both machines.  After I had trouble I found a Knowledge Base article that indicated I should probably be using the 32-bit one instead.  So I removed the drivers from the target and installed the 32-bit ones using odbcad32.exe found in Windows/SysWOW64.  No change.
    I'm using the browser2.prj sample project included with the SQL toolkit (by default at: C:\Users\Public\Documents\National Instruments\CVI\samples\sql\apps) to test the functionality of the SQL toolkit.  I build a distribution kit including the Shared Run-Time Engine on the development machine and install that on the target.  I have traced the problem to the call for DBSources() - it returns a -100 (which, handily, is not amoung the list of database error codes).
    On both machines the ODBC drivers appear to be working.  I can get to the database using Control Panel->Administrative Tools->Data Sources (ODBC).  Selecting the database under either User DSN or System DSN and then clicking Configure will open the MySQL Connector/ODBC Data Source Connection window.  Clicking Test in that window will connect to the database.  
    So the problem seems to lie in the way that CVI connects to the database.  I'm clueless at this time, so any suggestions would be greatly appreciated.
    Solved!
    Go to Solution.

    Sorry if this is a stupid question:
    Have you followed the instructions in Help->Library Reference->SQL Toolkit Library->SQL Language Reference->Distributing an SQL Toolkit Executable or DLL ?
    Or is this an error you are getting despite following those instructions?

  • Memory Problems with Adobe PDF iFilter for 64-bit

    In preparation to rebuild my Windows Search Index, I installed the Adobe PDF iFilter for 64-bit on my system (Vista Business 64).  When I finally rebuilt the index, I wasn't too surprised by what I saw happen, namely, the SearchFilter.exe process would kick in whenever I wasn't using the system and just eat RAM.  One time I turned it on and it had allocated over 4,000 MB (and my system only has 4,030 MB available) so of course it was forcing all the other processes to hard fault (ie. everything was moving like molasses--for example, it took 20 minutes to put the thing to sleep).  But I just let it do it's work, figuring that perhaps this was to be expected relative to the small library of PDF's that I've accumulated on my computer, ranging from LaTeX generated text files, to containers for hi-res scans.  So, after a day and a half of basically not using my laptop, everything finally calmed down and I enjoyed the benefits of searching the content of my library from the Windows Start menu--for a short while.
    However, to my dismay I've encountered the problem that this freezing of my computer would now occur after everytime I download a new PDF (in this particular case they were Google Books scans) and then left the computer to idle.  Again, the SearchFilter.exe would allocate all of my RAM for itself and just push everything else onto the Virtual RAM, which means the SLOWEST possibly fetching you can get.  I had to uninstall as this was making my computer unusable for 15-30 minutes after each idle. Everything is back in working order without the iFilter, but I would like to know if anyone has reported such problems on x64 systems.  Obviously, I will also report the problem to Microsoft, since the search engine should certainly have the precaution to handle such memory problems.   However, it is a problem that is created by the Adobe PDF iFilter interacting with the Windows Search engine.

    Hello,
    We believe we have figured this out.  It looks like it has to do with the length of the default folder location for the Adobe iFilter.
    I was able to reproduce the issue and the following resolved it for me.  See if this resolves it for you all as well.
    Here is how to get Adobe Version 11 PDF filter to work.
     1 . If you haven’t already, run the following in SQL Server:
    Sp_fulltext_service ‘Load_os_resources’, 1
    Go
    --you might also need to run: 
    sp_fulltext_service ‘Verify_signature’,0  --This is used to validate trusted iFilters. 0 disables it. So use with caution.
    --go
    2. Stop SQL Server.  (Make sure FDHost.exe stops)
    3.  
    Uninstall the Adobe ifilter (because it defaulted to having spaces or the folder name is too long).
    4.  
    Reinstall the Adobe iFilter and when it prompts for where to install it, change it to: C:\Program Files\Adobe\PDFiFilter
    5.  Once the installation finishes, go the computer’s Environment variables. Add the following to the PATH.
    C:\Program Files\Adobe\PDFiFilter\BIN
    NOTE: it must include the BIN folder
    NOTE: If you had the OLD location that included spaces, remove it from the path environment variable.
    6. Start SQL Server
    7.  IF you had an existing Full-text index on PDFs, drop the full-text index and recreate it.
    8. You should now get results when you run sys.dm_fts_index_keywords('db','tblname')  --Note: Change db to be the actual database name and tblname to be the actual table name.
     Give this a try and see if this fixes yours. 
    Sincerely,
    Rob Beene, MSFT

  • Why do I get a class conflict between the Prepare SQL.vi and the Get Column Name.vi with the SQL Toolkit compatibility vis from the Database Connectivity Toolkit?

    I have done extensive programming with the SQL Toolkit with LabVIEW versions through 6.1. My customer now wants to upgrade to Windows 7, so I am trying to upgrade to LabVIEW 2009 (my latest purchased version) using the Database Connectivity Toolkit, and the SQL Toolkit Compatibility vis. Everything seemed to be going okay with the higher level SQL operations, but I ran into trouble with the Get Column Name.vi. 
    The pictures below show the problem. The original SQL Toolkit connected the Prepare SQL.vi with the Get Column Name.vi with a cluster of two references, one for connection, and one for sql. The new compatibility vis have a class conflict in the wire because the Prepare SQL.vi contains a cluster with connection, and command references, but the Get Column Name.vi expects a cluster with connection and recordset references. 
    How do I resolve this conflict?
    Thank You.
    Dan

    I've never worked with the old version of the toolkit, so I don't know how it did things, but looking inside the SQL prep VI, it only generates a command, and the the column name VI wants a recordset. I'm not super familiar with all the internals of ADO, but my understanding is that is standard - you only have the columns after you execute the command and get the recordset back. What you can apparently do here is insert the Execute Prepared SQL VI in the middle and that will return what you need.
    I'm not sure why it worked before. Maybe the execute was hidden inside the prep VI or maybe you can get the column names out of the command object before execution. In general, I would recommend considering switching to the newer VIs.
    Try to take over the world!

  • Help, Cannot connect to ODBC database using SQL Toolkit!

    Hello All,
    I am toying around with the SQL Toolkit evaluation (2.2 + the patch) and I am having difficulty.
    I ran the example program "connect" and it seems to work fine.
    However, I try to write my own program and I keep getting the same message:
    "Function DBConnect: (return value == -10 [0xFFFFFFF6]).
    Native error code - 2147467259 0x80004005
    The message differs from time to time, but the return value is constant.
    I am using both Microsoft SQL Server 2012 and MySQL.
    For MySQL I have installed the latest ODBC connector, 5.3.4. Inside the Control Panel/Data Sources(ODBC), I have a DSN named test_mysql in both User DSN and System DSN.
    I ran a test on the connection and the test passes. I am not sure if I should use the ansi or unicode driver, I have tried both with the same success.
    I am not sure I had configured the SQL Server connection properly, and will attempt that again.
    My CVI Code is simple enough:
    hdbc = DBConnect ("DSN=test_mysql"); 
    Every time I get a -10 from DBConnect. Either I have something configured wrong or I am missing something.
    Does anyone have any suggestions?
    Veni Vidi Duci
    Solved!
    Go to Solution.

    Update 2:
    After getting off the phone with Tech Support the problem has been identified!
    LabWindows SQL toolkit requires 32 bit DNS. My PC is a 64 bit, so my DNS manager defaulted to 64 bit.
    I needed to use the 32 bit DNS manager when working with the toolkit.
    Once I created my DNS connections using the 32-bit version of the ODBC Datga Source manager, everything worked fine.
    See this tech note:
    http://digital.ni.com/public.nsf/allkb/E7984C0DA0F0E65086257694005B4CB7
    Veni Vidi Duci

  • Is XML Publisher causing shared memory problem..?

    Hi Experts,
    Since this week, many of the Requisition/PO are erroring out with the below errors or similar to these errors:
    - ORA-04031: unable to allocate 15504 bytes of shared memorny ("sharedpool","PO_REQAPPROVAL_INIT1APPS","PL/SQL MPCODE","BAMIMA: Bam Buffer")
    ORA-06508: PL/SQL: could not find program unit being called.
    -Error Name WFENG_COMMIT_INSIDE
    3146: Commit happened in activity/function
    'CREATE_AND_APPROVE_DOC:LAUNCH_PO_APPROVAL/PO_AUTOCREATE_DOC.LAUNCH_PO_APPROVAL'
    Process Error: ORA-06508: PL/SQL: could not find program unit being called
    Few days back we were getting heap memory error for one of the XML Publisher report.
    I heard that XML Publisher requires lot of memory for sources/features,So I want to know whether XML Publisher can be one of the cause for memory problem to occur or this shared memory is not related with XML Publisher sources at all.
    Please advice.
    Many thanks..
    Suman
    Edited by: suman.g on 25-Nov-2009 04:03

    Hi Robert,
    Thanks for your quick reply...
    Apps version: 11.5.10.2
    database version: 9.2.0.8.0
    As I am a beginner in this so dont know much about this.. Can you please guide me on this.
    DBAs has increased the shared memory and problem has resolved but here I am more concrened whether the XML Publisher was or can be one od the cause for shared memory problem. Is there any way to check that or this occurs randomly and we can not check this.
    Please advice something.

  • DBPutRecord Error in SQL Toolkit 2.0 for Mysql

    Dear All
    I am using Labwindows/CVI 7.1.1 with SQL Toolkit 2.0. I have facing problem in DBPutRecord in database.
    First I mapped the Table. While putting Records in table I am facing native Error Code 2147467259.
    I can Get the Datas from Table using bound funtion
    But Same function and method working fine in CVI 5.5.
    Please some one give me the Solution.

    kindly refer this and this knowledgebase
    Shreyas Hebbare
    Shreyas Technologies
    India

  • ODBC Linux Memory Problem

    Hi,
    I seem to have a big problem with an application I've made.
    The application connects to a Oracle Database, fills the database with arround 1GB of information. Once the database is filled my application launches a series of queries to test performance.
    My problem is when working with Oracle 11 in Linux (Fedora and Oracle Enterprise Linux). Apparently I can't seem to get past the database filling process. The free memory vanishes quite fast, eaten up between my application proces' and Oracle's. Now, I know the problem is not with my application because the same code works perfectly in the following databases:
    Windows:
    - Oracle 10R2
    - Oracle 11g
    - PostgreSQL 8.3
    - MySQL 5.1
    - MySQL 6-alpha
    - SQL Server 2005 Express Edition
    Linux:
    - PostgreSQL 8.3
    - MySQL 5.1
    - MySQL 6-alpha
    My application actually connects to the database and starts executing the inserts successfully. It's just that at some point the memory gets filled up, pretty quickly actually. I've watched the through vmstat. The first one to fall is the free memory, then follows the cache memory. And then it starts filling up swap. When it reaches to 2GB of used swap the behavior differs with the Linux Distribution: Fedora Core 8 crashes horribly, in Oracle Enterprise Linux at some point my application's process goes to "sleep" and I seem to still be able to do other things.
    To connect to the database I use the [OTLv4 library|otl.sourceforge.net]. One might think that my problem is with OTL, but I use the same OTL in all those cases, and unless it's an issue between Oracle in Linux and OTL I don't think it's an OTL issue.
    Can anyone push me in some direction ?
    Thanks.

    Well, you seem to have a memory leak in your application, assuming nothing else is running. Check out the top(1) program; you can get it to sort the displayed processes according to how much %MEM (percent of memory) they are using. First entry is the culprit.
    The best way I've found to locate a memory leak is to run your program using valgrind(1). This tool runs your application in a virtual CPU built in to valgrind(1). It can detect tons of different memory usage issues, from using an un-initialized variable to leaked memory.
    Of course, you may not have a memory problem. Does you program generate huge bursts of I/O or is the I/O more evenly paced? Kernel I/O backlog can consume memory quickly. While your application is running, open two more windows. In one, run the command:
    $ watch -n3 -d cat /proc/meminfo
    and in the other:
    $ watch -n3 -d cat /proc/slabinfo
    Try to figure out what memory usage is steadily increasing; that can tell us if the app is leaking or the I/O channels just can't keep up.
    Hope this gives you some ideas about how to proceed.

  • LabWindows CVI and SQL Toolkit cursor/sch​ema error

    We are using CVI 8.5 and SQL Toolkit 2.0.6 to write data to a SQL Server 2008 database.  We are utilizing the Microsoft ODBC SQL Server (non-native) driver.  We build a transaction that calls stored procedures on the database to write the data.  Occasionally we get the following error:
    "Could not complete cursor operation because the table schema changed after the cursor was declared"
    The error is unusual since we only use one cursor and it is in a stored procedure that gets called by other software hundreds of times a day and never fails.  Our database is also designed to only append records, not change existing ones.  We're trying to pinpoint the error and I'm wondering if anyone knows if the SQL Toolkit uses cursors to build transactions or if this error has been seen by others.  Since upgrading the toolkit or drivers takes a lot of effort, I want to make sure that I understand the problem before I start throwing darts at it.  Thanks in advance for any insight.

    I've attached the function that's failing.  Unfortunately, the code isn't designed with much resolution as to what SQL toolkit call failed, since these calls haven't failed once validated and put into the production environment.  Can you tell if any of these functions use a cursor.  I could certainly try adding more resolution to the error handling, but since we've only seen errors occasionally in the production environment, I'd need to release a temp version and monitor it.  Let me know what you think.  Thanks.
    Attachments:
    StoreTestData.txt ‏5 KB

  • Out of memory problem using the API

    Hi all,
    I need your assistance, we are working with CDB 10.2 making searches and retrieving the documents with all their attributes.
    In our actual scenario we have a single user (which represents an application) accessing CDB. This user use several persistent sessions simultaneously. I mean, several thousands of final users connect to an application that uses one user of CDB to connect to CDB with several persistent sessions.
    To simulate this scenario we wrote java code that open five threads and make several searches (requesting all the attributes) using the same user on cdb.
    Retrieving a considerable amount of data found on the search (~5000), we found a “Out of memory” problem when we made these tests:
    -     5 threads obtaining 100 documents (and all their attributes) / search
    -     1 thread obtaining 500 documents (and all their attributes) / search
    -     Also we have same problem if we make several searches with less results
    We suppose it’s a configuration or code issue so we ask for your assistance and experience to solve it.
    Thanks for your help,
    Dani
    import java.sql.Connection;
    import oracle.ifs.examples.api.constants.AttributeRequests;
    import oracle.ifs.examples.api.util.CommonUtils;
    import oracle.ifs.fdk.Attributes;
    import oracle.ifs.fdk.ClientUtils;
    import oracle.ifs.fdk.FdkConstants;
    import oracle.ifs.fdk.FdkCredential;
    import oracle.ifs.fdk.ManagersFactory;
    import oracle.ifs.fdk.NamedValue;
    import oracle.ifs.fdk.Options;
    import oracle.ifs.fdk.SearchExpression;
    import oracle.ifs.fdk.SearchManager;
    import oracle.ifs.fdk.SimpleFdkCredential;
    import oracle.jdbc.pool.OracleDataSource;
    public class Prueba {
         public static void main(String args[]) {
              Thread thread = new BasicThread1();
              Thread thread1 = new BasicThread1();
              Thread thread2 = new BasicThread1();
              Thread thread3 = new BasicThread1();
              Thread thread4 = new BasicThread1();
              thread.start();
              thread1.start();
              thread2.start();
              thread3.start();
              thread4.start();
    class BasicThread1 extends Thread {
         public void run() {
              ManagersFactory session = null;
              try {
                   System.out.println(this.getName() + "-->init");
                   session = getSession();
                   SearchManager sManager = session.getSearchManager();
                   SearchExpression srchExpr = new SearchExpression(Attributes.SIZE,
                             new Integer(20000000), FdkConstants.OPERATOR_LESS_THAN);
                   NamedValue[] res = null;
                   for (int i = 0; i < 100000; i++) {
                        res = sManager.search(srchExpr, basicSearchOptions2,
                                  AttributeRequests.DOCUMENT_CATEGORY_ATTRIBUTES);
                   System.out.println(this.getName()+" --> fin sin error: " + res.length);
                   } catch (Throwable t) {
    t.printStackTrace();
    System.out.println("<--"+this.getName());
              } finally {
                   CommonUtils.bestEffortLogout(session);
         static NamedValue[] basicSearchOptions2 = new NamedValue[] {
                   ClientUtils.newNamedValue(
                                       Options.MULTILEVEL_FOLDER_RESTRICTION,
                                       Boolean.TRUE),
                   ClientUtils.newNamedValue(Options.SEARCH_FOR_DOCUMENTS,
                             Boolean.TRUE),
                   ClientUtils.newNamedValue(Options.SEARCH_FOR_FOLDERS,
                             Boolean.FALSE),
                   ClientUtils.newNamedValue(Options.RETURN_COUNT,
                             new Integer(500)) //<<Maximo nº de elementos
         private static ManagersFactory getSession() throws Exception {
         OracleDataSource ods = new OracleDataSource();
         ods.setURL("URL");
         Connection conn = ods.getConnection();
         FdkCredential credential = new SimpleFdkCredential("USER","PSW");
         ManagersFactory session = ManagersFactory.login(credential,
         "SERVER");
    return session;
    }

    re-Post

  • Data to sql server using labview and labview sql toolkit

    Hello everyone,
    I am using mssqlserver 7.0, labview 6.1 and labview sql toolkit.
    I am getting error while i try to store (large) data of size more than 4000bytes. Has anyone come accross such problem .
    Looking for your solutions or suggestion for the
    above said problem.

    Check if the threshold is actual 4095 or 4096.
    If so it is probably a default size of the field you are trying to write. If so, change table properties.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Cvi sql toolkit

    Hi
    we are using CVI 2012 and the latest sql toolkit. We want to find and update data in a mysql database. But we have the problem that we always get an error message.
    Here is our code:
        // initialisiert das SQL-Toolkit
        DBInit(DB_INIT_MULTITHREADED);
        DBInit(DB_INIT_SINGLETHREADED);
        sprintf(String, "DSN=SYSTEM_DATABASE; Server=127.0.0.1; Database=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 record 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 DBPutRecord cmd we get the attached error message
    Does anyone can help us?
    thanks in advance
    best regards
    Oliver
    Solved!
    Go to Solution.
    Attachments:
    Errormessage.JPG ‏50 KB

    Hi,
    I found a solution meanwhile:
    The map functions seem to be the problem.In a google research I found some remarks about similar problems.
    By using the "normal" Activate SQL functions it is running.
    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; Database=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 record 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);
    Thanks and kudos to me :-D
    Oliver

  • How to access SQL server using SQL toolkit from LabVIEW

    I 'm using Labview SQL toolkit to read from data base
    it is Okay for dBase but for SQL server we couldn't
    as we could read only the numeric fields but no longer for character fields

    Check to see if the text fields are defined as nvarchar or nchar. If I remember right, the old toolkit had some problems with these data types.

Maybe you are looking for

  • Memory_target and memory usage reported by windows taskmanager

    Hi, shouldn't Oracle 11g limit the amount of used memory (reported by windows taskmanager for process oracle.exe) to the value of "memory_target" (which means using automatic memory management)? My database running on Windows 2003 R2 32bit (RAC) is c

  • Deleteing Session through ABAP Program

    Hi, I want to delete a session through a custom Program. Can anybody help me on how can I do it through An abap program. I want to get the same functionality which we do through SM04 and not SM12. for. eg. I want  that program should take the userid

  • Cant access my music! HELP!!!

    I have an iPhone 4S and I had to get a replacement due to the volume bar issue. At the store they restored my phone to my ocloud backup, but upon looking into my music folder, its all grayed out and I cannot play any of the music(its all present in t

  • Modem issue on nf2

    posting this for a guy says he cannot log in Sorry to have to e-mail you, but my thread didn't seem to work.  You seem very knowledgable, I was wondering if you could help. I recently built a system for my brother. k7n2 m/b AMD XP2000+ MSI t4 4200 25

  • Duplicating (Saving) Versions and Commenting

    What a fantastic app! Three questions off the top: 1. I wonder if there is some way to add comments to a recording, such as name of the artist, or even adding a name to an individual track - such as the vocalist? For example, who is the artist on the