From: astroboy on 30 Mar 2008 23:10 Hi I am not familiar with ADO DB connection. I am using Labview 7.1, MySQL and LabSQL. To get LabSQL and MySQL, you can find <a href="http://jeffreytravis.com/lost/labsql.html" target="_blank">http://jeffreytravis.com/lost/labsql.html</a> and <a href="http://dev.mysql.com/downloads/mysql/4.1.html" target="_blank">http://dev.mysql.com/downloads/mysql/4.1.html</a>. In those LabsQL vi functions, there are no vi descriptions for connections. I tried finding similar descriptions to compare from ADO websites. I am getting confused. Here are LabSQL vi functions:- 1) ADO Connection Create.vi - means Create an connection to database? 2) ADO Connection Open.vi - means Open the connection to database? 3) ADO Connection Close.vi - means Close the connection to database? 4) ADO Connection Destroy.vi - means Destroy the connection to database? Are ADO Connection Close and Destroy same? And I am not familiar with the sequence of those vi. For eg. I read the procedure from <a href="http://www.w3schools.com/ado/ado_intro.asp" target="_blank">http://www.w3schools.com/ado/ado_intro.asp</a> Accessing a Database from an ASP Page The common way to access a database from inside an ASP page is to: - Create an ADO connection to a database - Open the database connection - Create an ADO recordset - Open the recordset - Extract the data you need from the recordset - Close the recordset - Close the connection So when I cannot find LabSQL functions for eg Open recordset and close recordset, so what is the equivalent ADO function to "destroy the connection"? And here are my attached, and I there's something i do not understand, And my question for my attached, typing my show processlist in command prompt, When run attached for the first time, "show processlist" command show no host to "test" db. when click to open database, "show processlist" command shows my host to "test" db. When click to close database, "show processlist" command still shows my host to "test" db. Why is this so? By right, there should be no sign of "test" db. Do i have to use ADO Connection Destroy vi to destroy connection? Please advise Thanks testdb_connection.vi: http://forums.ni.com/attachments/ni/170/312300/1/testdb_connection.vi
From: astroboy on 31 Mar 2008 20:40 Hi Van_L and Smercurio_fc, Thanks for your advices. Now I undesrtand better. clement
From: astroboy on 31 Mar 2008 21:10 Hi Smercurio_fc, Show processlist is actually a command used in MySQL that will show you the actual connection threads to the various databases. So that we will know how many actual and duplicated connections we have. Using this, we can determine whether our LV program has actually closed the connection based on the number of open connections, so that it will not lead to error such as "Too many connections" that runs out of the max number of connections as set. Clement
From: smercurio_fc on 1 Apr 2008 10:10 OK, thanks for the info. Sounds like the MySQL version of SQL Profiler that comes with SQL Server.
From: EWTech on 16 Apr 2008 13:40 There are other possibilities. I built a dll project in Visual Studio and used the dll Constructor Node and Invoke Node fuctions in LV 8..5.1 to attach to the dll file. It saves to a separate database using ADO.NET rather than the ADO functions built into LabSQL. It requires a bit more effort in some ways but it's very flexible. I'm not sure what there is in LV 7 but these fuctions seem to be in 8.2.1 as well.
|
Pages: 1 Prev: DDE Help? Next: MS VC++ runtime error - running nimxs.exe suring computer boot |