LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Try this!

Here is the VI which can access database(MS).
The problem is that it does not work. Smiley Sad
Tell me why?
Creat your own database as test.mdb. Then Columns as Slno(integer)(col1), Username(string)(col2),Password(string)(col3),Level(string)(col4).
Enter accordingly. Becasue I database(.mdb) files are not allowed here...Smiley Sad
Use the commands I have put on the front panel.
----------------------------------------------------------------------------------
I have still not got what I love.....
0 Kudos
Message 1 of 12
(3,929 Views)


Halemani wrote:
Enter accordingly. Becasue I database(.mdb) files are not allowed here...Smiley Sad

You can put your VI and the mdb file inside a zip fine and attach it.
 
(For best results in getting help, I would also highly recommend to use a proper title for your posts. "Try this!" is very generic and does not relate to your problem. Most people will not read your post because the title does not sound interesting. A better title would e.g. be: "Database problem using activeX" or similar.)
0 Kudos
Message 2 of 12
(3,900 Views)
Ok, I got it.
Here is the ZIP file.Smiley Wink
Help.
----------------------------------------------------------------------------------
I have still not got what I love.....
0 Kudos
Message 3 of 12
(3,851 Views)
Can someone please tell me how to edit my own post?Smiley Sad
----------------------------------------------------------------------------------
I have still not got what I love.....
0 Kudos
Message 4 of 12
(3,849 Views)


Halemani wrote:
Can someone please tell me how to edit my own post?Smiley Sad



At the top right of your message is a drop down menu called "Options".  In there is a menu choice Edit Post.  That choice will only be there for up to 10 minutes after you originally posted.  If you don't submit your edited post within 10 minutes of the original post, your edits will be lost.
0 Kudos
Message 5 of 12
(3,845 Views)
Try this out...
This may be helpful if u r using SQL.
 
0 Kudos
Message 6 of 12
(3,838 Views)
No I have those VIs. But in my VI they are not working as they should be. So I don't know why. I am using the correct SQL commands.


Message Edited by Halemani on 04-27-2008 11:26 PM
----------------------------------------------------------------------------------
I have still not got what I love.....
0 Kudos
Message 7 of 12
(3,828 Views)

I just tried your mdb file. I used the functions from the link I have given earlier.

First time I was able to connect to the database. But the command to retrieve all data from the table "Table" returned an error.

Then I opened the file in MS Access and renamed the table to MyTable, save and closed. This time I was able to retrieve data from the table. (Select * from MyTable;).

Next, I used your VI, chnaged the table name (in the command) to MyTable. Still problem. Error returned.

Back to my VI, I tried to use the command "select Slno,Username,Password,Level from mytable where Slno=3;". It returned me an error as in the picture.

I guess you have to avoid using certain terms, that are reserved as far as SQL is concerned. So try after changing them. In this case TABLE and LEVEL cannot be used as they seems to be reserved for SQL.

0 Kudos
Message 8 of 12
(3,807 Views)
One more thing I noticed that the SlNo is not a numeric. I am getting an error when I used "WHERE SlNo=3" while "WHERE SlNo='3'" is ok. So pls check that as well.
0 Kudos
Message 9 of 12
(3,804 Views)
Yes you are right.
I knew it but wanted know I was making a mistake or not.Smiley Wink
I tried renaming Password and Level to Pswd and Lvl resply. It worked.Smiley Very Happy
I didn't knew they were reserved.
About Slno it is Numeric.
----------------------------------------------------------------------------------
I have still not got what I love.....
0 Kudos
Message 10 of 12
(3,794 Views)