Jump to content

my ADO-Toolkit for LabVIEW 8


Recommended Posts

there is a new version of my ADO-Toolkit availiable. I made it for LabVIEW 8, because the "date time" cluster contains now a new element for fractional seconds. I don't use fractional seconds, but i wanted to get rid of the warnings and coercion dots ;-). There have been many improvements since my first post here, especially the documentation.

Maybe someone can help me with the palettes? I still could not figure out, how i can get rid of the "additional columns" in the palette view. I can delete them, and they are gone in edit mode, but they are there again after saving :throwpc:

Ah, there is an example for download on my homepage, if you are interested, and a version for LabVIEW 7.1, too ...

installation is simple: just extract the zip file to your vi.lib/addons folder, restart LabVIEW and you sould find the VIs in the Addons palette.

thx! i would be glad, if you find it usefull (amusing, or a nice toy) and feedback is allways wellcome!

Download File:post-885-1136980375.zip

Link to comment
  • 1 month later...
  • Replies 61
  • Created
  • Last Reply

Top Posters In This Topic

Your toolkit is nice. However I am wondering why you did this with LabSQL available as opensource? Did you just want to have your own?

thanks! getting good feedback is allways nice :-)

when i started the development, I knew nothing about LabSQL, and i started developing, because i was to cheap to pay 1200

Link to comment
Maybe someone can help me with the palettes? I still could not figure out, how i can get rid of the "additional columns" in the palette view. I can delete them, and they are gone in edit mode, but they are there again after saving :throwpc:

I believe the palette size (number of columns of VIs) actually depends on the filename-length of the VIs on the palette. The longest VI name on the palette is how wide the palette will be. Like this:

post-311-1139892571.png?width=400

-Khalid

Link to comment
I believe the palette size (number of columns of VIs) actually depends on the filename-length of the VIs on the palette. The longest VI name on the palette is how wide the palette will be. Like this:

post-311-1139892571.png?width=400

-Khalid

that sounds plausible ..

thx!

Link to comment
  • 5 months later...
hi,i2dx

Can I use your VI's to accesee the remote database(Microsoft Access 2003).

thank you

yes you can do this, BUT

I would not recommend it, because accessing a remote *.mdb-file means, the JET database module copies the parts of the database, it needs for executing your query, to a temporary local file, wich might result in a huge network load, if your database becomes bigger and bigger. I would recomend an Access Database as local DB (with local file) only and would use an MS SQL Server 2005 Express for remote databases.

I have finishied a project with a MS SQL Server 2005 Express a few weeks ago, and it works really good. Especially the Stored Procedures are a big advantage and make the DB communication faster, more reliable and easier to programm:

compare

SELECT a.col1, b.col2 FROM tbl_aaa AS a INNER JOIN tbl_bbb AS b ON a.id = b.fk_a WHERE a.col6 = 1 AND .....

against

EXEC SP_select_ab %a=1, %b=N'string'

AND you can change the queries in the SQL-Server without touching your LV Programm - if you don't change the parameters ...

BTW: your post reminds me, to put the latest verstion on my website ;)

cheers,

CB

Link to comment
there is a new version of my ADO-Toolkit availiable. I made it for LabVIEW 8, because the "date time" cluster contains now a new element for fractional seconds. I don't use fractional seconds, but i wanted to get rid of the warnings and coercion dots ;-). There have been many improvements since my first post here, especially the documentation.

Maybe someone can help me with the palettes? I still could not figure out, how i can get rid of the "additional columns" in the palette view. I can delete them, and they are gone in edit mode, but they are there again after saving :throwpc:

Ah, there is an example for download on my homepage, if you are interested, and a version for LabVIEW 7.1, too ...

installation is simple: just extract the zip file to your vi.lib/addons folder, restart LabVIEW and you sould find the VIs in the Addons palette.

thx! i would be glad, if you find it usefull (amusing, or a nice toy) and feedback is allways wellcome!

Download File:post-885-1136980375.zip

THANKS FOR YOUR KINDNESS

DO YOU HAVE THE MANUAL FOR YOUR VIs AND EXAMPLES?

THANKS AGAIN

there is a new version of my ADO-Toolkit availiable. I made it for LabVIEW 8, because the "date time" cluster contains now a new element for fractional seconds. I don't use fractional seconds, but i wanted to get rid of the warnings and coercion dots ;-). There have been many improvements since my first post here, especially the documentation.

Maybe someone can help me with the palettes? I still could not figure out, how i can get rid of the "additional columns" in the palette view. I can delete them, and they are gone in edit mode, but they are there again after saving :throwpc:

Ah, there is an example for download on my homepage, if you are interested, and a version for LabVIEW 7.1, too ...

installation is simple: just extract the zip file to your vi.lib/addons folder, restart LabVIEW and you sould find the VIs in the Addons palette.

thx! i would be glad, if you find it usefull (amusing, or a nice toy) and feedback is allways wellcome!

Download File:post-885-1136980375.zip

ONE QUESTION:CAN ADO-Toolkit BE USED TO ACCESS REMOTE DATABASE? CAN YOU GIVE A EXAMPLE? THANKS

Link to comment
THANKS FOR YOUR KINDNESS

DO YOU HAVE THE MANUAL FOR YOUR VIs AND EXAMPLES?

THANKS AGAIN

ONE QUESTION:CAN ADO-Toolkit BE USED TO ACCESS REMOTE DATABASE? CAN YOU GIVE A EXAMPLE? THANKS

you can download the newest version of the ADO-Toolkit here:

ADO-Tool

and you can find an example here:

ADO-Tool Examples

--> sorry, I don't have any manuals jet - I'm still to busy + lazy

As I wrote in my last post: yes you can use remote Databases, e.g. Microsoft SQL-Server. All you have to do is to create a System (or User) DSN and use the Instance "Connect to SQL-Server" instance of the polymorphic "connect" VI. If you want to use MySQL, install the myODBC driver, create a System (ur User) DSN and use the "Connect to mySQL" instance ...

Link to comment
  • 2 weeks later...
Hello:

Your toolkit is excellent! congratulations... :D I use it for my new project, but I have a questions: when I build my executable, how automatically detect the folder installations, I tried, but without succes. Any sugestions?

Thanks in advance

Julio :):)

thank you!

regarding the paths, i suggest to use this VI:

Download File:post-885-1156006697.vi

Link to comment
  • 1 month later...

Hi Id2x

At the moment I am making a small project connecting an optoelectronic device by means of the protocol rs232 in labview, which makes software is to capture different times in a numerical array, which I have not been able to do is to send this numerical array to a data base developed by means of MS Access. Can you help me with an example of this?

Thanks for your help.

Link to comment
Hi Id2x

At the moment I am making a small project connecting an optoelectronic device by means of the protocol rs232 in labview, which makes software is to capture different times in a numerical array, which I have not been able to do is to send this numerical array to a data base developed by means of MS Access. Can you help me with an example of this?

Thanks for your help.

I have updated the examples. In "ado-bsp-03.vi" you can find an example, how to insert an 1D Array into a Memo field. I hope, that will help you out ...

cheers,

CB

Link to comment

Hello Id2k.

In your example ado-bsp_02 I try to make some modifications that were coupled with my current necessities

I don't really understand much of databases but I try to make the best thing possible with unfortunate been for that when I execute my application it leaves the error code -2147217900, I don't really know where is possibly my error in the code and in the database that I carry out.

I please request you help me since it is high-priority for my to conclude my project; for that only makes me lack to enter this code portion to conclude my program in LabView.

If you are so kind you correct me my errors and this way to be able to finish with my problems.

Many thank you.

Hello Id2x.

In your example ado-bsp_02 I try to make some modifications that were coupled with my current necessities

I don't really understand much of databases but I try to make the best thing possible with unfortunate been for that when I execute my application it leaves the error code -2147217900, I don't really know where is possibly my error in the code and in the database that I carry out.

I please request you help me since it is high-priority for my to conclude my project; for that only makes me lack to enter this code portion to conclude my program in LabView.

If you are so kind you correct me my errors and this way to be able to finish with my problems.

Many thank you.

Download File:post-6467-1160719717.zip

Download File:post-6467-1160720308.zip

Link to comment

ok, I took a look:

You get the errors, because your SQL Statements are not correct. Because I don't know exactly, what you want to archieve, I'll explain it a little bit more genericaly:

Imagine you have 2 tables in your access database, the first table, "tbl_1" has 4 columns:

id_tbl1 --> AutoValue, PrimaryKey, increment

firstname --> text field, length 50 chars

lastname --> text field, length 50 chars

numvalue --> numerical value, long integer

the second table "tbl_2" has 5 columns:

id_tbl2 --> AutoValue, PrimaryKey, increment

fk_tbl1 --> Foreign Key to id_tbl1, numerical, long integer

nvalue1 --> numerical value, double

nvalue2 --> numerical value, double

nvalue3 --> numerical value, double

You want to insert one row in tbl_1 and

3 rows into tbl_2, which refer to the row you inserted in tbl_1 before

Your format strings, to format your SQL-Statements should look like:

INSERT INTO tbl_1 (firstname, lastname, numvalue) VALUES ('%s', '%s', %d)

connect that to the "ADOTool_Insert Data Get Identity.vi", which gives you back the value of id_tbl1 of the previous inserted row (it makes a Querie "SELECT @@identity" ...) at the DB AutoID output. Please note, that you have to put quotes >'< around string data!

e.g. if firstname = Lite, lastname = Miller and numvalue should be 15, your insert statement is:

INSERT INTO tbl_1 (firstname, lastname, numvalue) VALUES ('Lite', 'Miller', 15)

let's asume, that was the 154th row, you inserted in that table, thus the DB AutoID = 154 ...

Your second insert Statement should look like:

%.;INSERT INTO tbl_2 (fk_tbl1, nvalue1, nvalue2, nvalue3) VALUES (%d, %0.15e, %0.15e, %0.15e)

%.; is used to make sure that the dot is used as decimal point, not the comma ...

if your values are 16.7 , 745.3, 9523.742 --> your statement is:

INSERT INTO tbl_2 (fk_tbl1, nvalue1, nvalue2, nvalue3) VALUES (154, 1.670000000000000E+1, 7.453000000000000E+2, 9.523742000000000E+3)

Please notice that the "RowCount" MUST MATCH the "ValueCount"! --> that means

INSERT INTO table name

(Col1, Col2, Col3, Col4) <-- here you define, you want to insert into 4 columns

VALUES

(Val1, Val2, Val3, Val4) <-- therefore you have to provide EXCACTLY 4 values!

I hope that helps ...

cheers,

CB

Link to comment

I2dx Thanks so much, your help is very important for me.

ok, I took a look:

You get the errors, because your SQL Statements are not correct. Because I don't know exactly, what you want to archieve, I'll explain it a little bit more genericaly:

Imagine you have 2 tables in your access database, the first table, "tbl_1" has 4 columns:

id_tbl1 --> AutoValue, PrimaryKey, increment

firstname --> text field, length 50 chars

lastname --> text field, length 50 chars

numvalue --> numerical value, long integer

the second table "tbl_2" has 5 columns:

id_tbl2 --> AutoValue, PrimaryKey, increment

fk_tbl1 --> Foreign Key to id_tbl1, numerical, long integer

nvalue1 --> numerical value, double

nvalue2 --> numerical value, double

nvalue3 --> numerical value, double

You want to insert one row in tbl_1 and

3 rows into tbl_2, which refer to the row you inserted in tbl_1 before

Your format strings, to format your SQL-Statements should look like:

INSERT INTO tbl_1 (firstname, lastname, numvalue) VALUES ('%s', '%s', %d)

connect that to the "ADOTool_Insert Data Get Identity.vi", which gives you back the value of id_tbl1 of the previous inserted row (it makes a Querie "SELECT @@identity" ...) at the DB AutoID output. Please note, that you have to put quotes >'< around string data!

e.g. if firstname = Lite, lastname = Miller and numvalue should be 15, your insert statement is:

INSERT INTO tbl_1 (firstname, lastname, numvalue) VALUES ('Lite', 'Miller', 15)

let's asume, that was the 154th row, you inserted in that table, thus the DB AutoID = 154 ...

Your second insert Statement should look like:

%.;INSERT INTO tbl_2 (fk_tbl1, nvalue1, nvalue2, nvalue3) VALUES (%d, %0.15e, %0.15e, %0.15e)

%.; is used to make sure that the dot is used as decimal point, not the comma ...

if your values are 16.7 , 745.3, 9523.742 --> your statement is:

INSERT INTO tbl_2 (fk_tbl1, nvalue1, nvalue2, nvalue3) VALUES (154, 1.670000000000000E+1, 7.453000000000000E+2, 9.523742000000000E+3)

Please notice that the "RowCount" MUST MATCH the "ValueCount"! --> that means

INSERT INTO table name

(Col1, Col2, Col3, Col4) <-- here you define, you want to insert into 4 columns

VALUES

(Val1, Val2, Val3, Val4) <-- therefore you have to provide EXCACTLY 4 values!

I hope that helps ...

cheers,

CB

Link to comment

Hello i2dx.

I have a technical question and a doubt with your example ado-bsp_03.

The technical question consists in:

How can I carry out a code where one can make a consultation of a database in LabView?

The doubt that I have with your example ado-bsp_03 is that when I try to open it in labview, this requests me a libraries which are:

- ADOTool_Access_BinData Array to Hex String.vi

- ADOTool_Access_poly_1D SGL Array to HEX String.vi

- ADOTool_Access_HEX String to BinData Array.vi

- ADOTool_Access_HEX-String2 1D SGL Array.vi

Really, me not you if the libraries that I mention lack in your ADO-Tool and if it is could you publish this way them in the forum; or do these libraries make part of another tool?.

Already attempt both versions of your examples that you published opening up.

Thank you for your patience and I value your help a lot.

Link to comment
Hello i2dx.

I have a technical question and a doubt with your example ado-bsp_03.

The technical question consists in:

How can I carry out a code where one can make a consultation of a database in LabView?

The doubt that I have with your example ado-bsp_03 is that when I try to open it in labview, this requests me a libraries which are:

- ADOTool_Access_BinData Array to Hex String.vi

- ADOTool_Access_poly_1D SGL Array to HEX String.vi

- ADOTool_Access_HEX String to BinData Array.vi

- ADOTool_Access_HEX-String2 1D SGL Array.vi

Really, me not you if the libraries that I mention lack in your ADO-Tool and if it is could you publish this way them in the forum; or do these libraries make part of another tool?.

Already attempt both versions of your examples that you published opening up.

Thank you for your patience and I value your help a lot.

then youe've not got the latest update ... please go to my homepage and download the latest version of the ado toolkit. the VIs you are missing are new in V 1.5.2, so , if you have an older version - of course you don't have them ;)

cheers,

cb

Link to comment

Hello i2dx.

Of my previous consultation I wanted to make some explanations that it is what I am needing.

I want to make kind of a consultation form where I can write in a string control a date inside a column of one of the table of my database and the program looks for that date and it shows it in a string indicator, for example a first name, a last name or a number of identification and when I make it it shows the results associated to this entered date.

Thanks.

Link to comment
Database Toolkits are allmost useless without some Knowledge of SQL.

I've gotta agree - there are plenty of half-arsed SQL abstractions out there, but unless you know some basic SQL then you're not going to get anywhere. In all seriousness, you only need to know a handfull of SQL statements to get up and running, and if your database admin uses stored proceedures then it's even easier!

Check out this site - it gives you enough information to be dangerous :)

Link to comment
hmm, sorry, I have no idea what you mean, but generally I'd say: maybe you have to spend a few bucks and buy a SQL Book? Database Toolkits are allmost useless without some Knowledge of SQL.

cheers,

CB

Appreciated i2dx.

I know perfectly that I am beginning to know on databases, it is possible that I have abused of your knowledge, but if I had the opportunity to share my knowledge for a person that needs it with a lot of pleasure I would make it, as well as to you you are facilitated this topic to my they are facilitated others that would be you in a future.

I would like you to help me in what I need and maybe I could help you in electronics that is my specialty.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.