LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Log in

HI here is my question

I have a VI of a Log-in , and I want to put

an option where you can add a new user, but a don't know how

to save the new user and password on a table that a made on access

can someone help me?

0 Kudos
Message 1 of 11
(3,927 Views)

well you can use Activex or if you have the database connectivity toolkit you can use it to connect to Access and save your data

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 2 of 11
(3,918 Views)

Hi,

Ya thats true you have to make creat table in data base or exel.

Let me alobarate in brief. There are lot many other ways but simple one is

Creat new vi say name it add user.vi

You creat a table say User details. on Front panel.

Column name Username , User level ( If you have) , Password.

This table you can save into the database as well as into the binary file So that others cant view.

 

Creat a string control User name and two string control for password repeatablity check. and userlevel if you want (admin, sup, operator)

Creat two button name Add user and  Cancle ( Or close window you can use).

On add User Event "check both password are same" and "user already there",  Then you can add user name, User level , password into the table.

Thats it.

This table you can use in Login.vi

Read this table for login vi.

 

Thanks

CLAD
Labiew programmer
0 Kudos
Message 3 of 11
(3,899 Views)

I didnt understand exactly what you say, but i made it using sql code to write user and password to the access table 🙂

 

On add User Event "check both password are same" and "user already there",  Then you can add user name, User level , password into the table.

Thats it.

 

How can I check if the user is already  there?.

 

Thanks

0 Kudos
Message 4 of 11
(3,872 Views)

Select <username> from <namecolumn>

 

If you get a value back, it's there.

 

There may be a better way, I haven't used DB queries too much.

 

If you want to add it if it doesn't exist already, have a look at this article

 

http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html

0 Kudos
Message 5 of 11
(3,867 Views)
0 Kudos
Message 6 of 11
(3,861 Views)

Hey thanks, I try some examples but didnt function, but thanks anyway. 😄

0 Kudos
Message 7 of 11
(3,852 Views)

At this point you should really post your code and your access database for people to help you figure out what's going on.

0 Kudos
Message 8 of 11
(3,845 Views)

Well here's the block diagram, someone gave me a code on SQL

but I don't know were to put it, he said that on  ADO

But don't know what ADO, and how  to use it

 

*****************code **********************

"select * from login where usuario='" & txtusuario & "' and contrasena='"
& txtcontrasena & "'"
if adodc1.recordcount>0 then
msgbox "User and password repeated"
else
'add values
end if

0 Kudos
Message 9 of 11
(3,835 Views)

You have not posted your code. You posted an image which cannot be debugged. You would also need to post those SQL functions. Those are not from the NI toolkit or the commonly used LabSQL toolkit.

0 Kudos
Message 10 of 11
(3,806 Views)