oracle - Login form within vb.net- to direct to different forms -



oracle - Login form within vb.net- to direct to different forms -

in login form vb.net connected oracle database.. there way of inserting if statement direct different users different forms.. eg, accountant accounting home page or driver driver homepage though there id's , passwords in 1 table within database.

there position field within database , utilize differentiate different users levels of access.

here code working far:

dim conn new oledb.oledbconnection conn.connectionstring = _ "provider=msdaora;data source=orabis;user id=112221800;password=112221800;" conn.open() dim parmuser new oledb.oledbparameter parmuser.oledbtype = oledb.oledbtype.char parmuser.value = txtstaffno.text dim parmpass new oledb.oledbparameter parmpass.oledbtype = oledb.oledbtype.char parmpass.value = txtpassword.text dim cmd new oledbcommand cmd.connection = conn cmd = new oledbcommand("select staffid,password staff staffid ='" & txtstaffno.text & "' , password ='" & txtpassword.text & "'", conn) cmd.commandtype = commandtype.text dim dr oledb.oledbdatareader dr = cmd.executereader() if txtstaffno.text = "" or txtpassword.text = "" messagebox.show("you have not entered values!", "error", messageboxbuttons.ok, messageboxicon.error) elseif dr.read() txtstaffno.text = dr("staffid") txtpassword.text = dr("password") msgbox("access allowed") custoption.show() me.hide() else 'messagebox.show("wrong username , password", "error", messageboxbuttons.ok, messageboxicon.error) 'intcount = intcount + 1 end if

for web site/app use

switch (position){ case "admin": server.transfer("adminhomepage.aspx"; brea; case "blabla": //and on default: server.transfer("home.aspx" }

for windows forms reply similar. have wo pick form. i.e. new formadminhome().showdialog()

vb.net oracle

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

Hibernate criteria by a list of natural ids -

ios - Lagging ScrollView with UIWebview inside -