By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,584 Members | 1,750 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,584 IT Pros & Developers. It's quick & easy.

how stored procedure calling different forms

P: 2
i write a oracle stored procedure in login screen.. its two different type of login employee and employer...in front end assign the procedure in class file... how to call different forms

my procedure
cmd = New OracleCommand("login", con)
cmd.CommandType = Data.CommandType.StoredProcedure
cmd.Parameters.Add("P_USERNAME", OracleType.VarChar, 45).Value = uid
cmd.Parameters.Add("P_PASSWORD", OracleType.VarChar, 45).Value = pwd
cmd.Parameters.Add("P_LOGIN_TYPE", OracleType.VarChar, 45).Value = "E"
cmd.Parameters.Add("P_IP_ADDRESS", OracleType.VarChar, 45).Value = ipadd
pui = New OracleParameter("P_PORT_USER_ID", OracleType.VarChar, 25)
errmsg = New OracleParameter("P_MESSAGE", OracleType.VarChar, 25)
pui.Direction = Data.ParameterDirection.Output
errmsg.Direction = Data.ParameterDirection.Output
da = New OracleDataAdapter(cmd)
cmd.Parameters.Add(pui)
cmd.Parameters.Add(errmsg)
cmd.ExecuteNonQuery()

E variable is assign employee or employer
Jun 19 '07 #1
Share this Question
Share on Google+
1 Reply


nateraaaa
Expert 100+
P: 663
i write a oracle stored procedure in login screen.. its two different type of login employee and employer...in front end assign the procedure in class file... how to call different forms

my procedure
cmd = New OracleCommand("login", con)
cmd.CommandType = Data.CommandType.StoredProcedure
cmd.Parameters.Add("P_USERNAME", OracleType.VarChar, 45).Value = uid
cmd.Parameters.Add("P_PASSWORD", OracleType.VarChar, 45).Value = pwd
cmd.Parameters.Add("P_LOGIN_TYPE", OracleType.VarChar, 45).Value = "E"
cmd.Parameters.Add("P_IP_ADDRESS", OracleType.VarChar, 45).Value = ipadd
pui = New OracleParameter("P_PORT_USER_ID", OracleType.VarChar, 25)
errmsg = New OracleParameter("P_MESSAGE", OracleType.VarChar, 25)
pui.Direction = Data.ParameterDirection.Output
errmsg.Direction = Data.ParameterDirection.Output
da = New OracleDataAdapter(cmd)
cmd.Parameters.Add(pui)
cmd.Parameters.Add(errmsg)
cmd.ExecuteNonQuery()

E variable is assign employee or employer
Could you have the stored procedure return a value such as 1 for an Employee and 2 for an Employer then based on what is returned show the proper form to the logged in user?

Nathan
Jun 19 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.