473,406 Members | 2,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

how stored procedure calling different forms

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
1 1930
nateraaaa
663 Expert 512MB
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

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

Similar topics

2
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered...
14
by: krishna1412 | last post by:
Currently i am working in a project of report generation in MS ACCESS. The tables are in sql server 2000. I have to write stored proc in ms access. Illustration: I am having a stored proc...
9
by: fniles | last post by:
I am using VB.NET 2003 and SQL2000 database. I have a stored procedure called "INSERT_INTO_MYTABLE" that accepts 1 parameter (varchar(10)) and returns the identity column value from that table....
2
by: =?Utf-8?B?YW5vb3A=?= | last post by:
Hello, I have a stored procedure named as usp_CheckLogin with two parameters as @usID, @Password also values of these parameters are to be extracted using Request.Form from the fields in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.