| | |
Accessing Oracle stored functions from asp.net
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2008
Posts: 6
Reputation:
Solved Threads: 1
I'm new to asp.net and I have an oracle stored function with 3 input parameters that returns a string. The function is one that validates a user. I want to validate my users from Oracle. I'm trying to use the sqldatasource component to interact with my stored procedure but I can't seem to find the right syntax.
First of all I've configured the sqldatasource to connect to the correct database. I've also configured the define custom statement or stored procedures in the select tab and defined my parameters.
Now I'm using the authenticate event handler of the login control to load the values into my stored function and read the result back, but I'm not sure of the correct syntax and can't seem to find anything on the web.
I was hoping that textBox1.text would contain the results of my stored function but it actually displays 'SYSTEM.DATA.DATAVIEW'
HERE IS MY CODE:
First of all I've configured the sqldatasource to connect to the correct database. I've also configured the define custom statement or stored procedures in the select tab and defined my parameters.
Now I'm using the authenticate event handler of the login control to load the values into my stored function and read the result back, but I'm not sure of the correct syntax and can't seem to find anything on the web.
I was hoping that textBox1.text would contain the results of my stored function but it actually displays 'SYSTEM.DATA.DATAVIEW'
HERE IS MY CODE:
asp Syntax (Toggle Plain Text)
Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) 'HERE I'M INITIATINT THE ARGUMENTS TO BE PASSED TO THE SELECT STATEMENT, BUT NOT REALLY SURE WHY THIS IS IMPORTANT Dim arguments As New DataSourceSelectArguments 'HERE I'M ATTEMPTING TO MAKE SOME SORT OF RETURN VALUE, BUT AGAIN NOT SURE WHY Dim returnValue As System.Data.DataView 'THESE STATEMENTS SHOULD BE LOADING MY DATA INTO THE PARAMETERS OF THE SQLDATASOURCE DataSourceUsers.SelectParameters("IN_USER_ID").DefaultValue = "myuserid" DataSourceUsers.SelectParameters("IN_PASSWORD").DefaultValue = "mypassword" DataSourceUsers.SelectParameters("IN_APPLICATION").DefaultValue = "AC360" 'HERE I CALL THE SELECT METHOD OF THE SQL DATA SOURCE 'BUT NOT SURE IF MY ARGUMENTS AND RETURN VALUE ARE CORRECT returnValue = DataSourceUsers.Select(arguments) 'HERE I'M TRYING TO VIEW THE RESULTS ON THE FORM TO SEE WHAT HAPPENED TextBox1.Text = returnValue.ToString
Last edited by peter_budo; May 14th, 2008 at 3:02 pm. Reason: Keep It Organized - please use [code] tags
![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: Dropdown acting funny within Iframe
- Next Thread: Storing and retrieving multi selected values in Cookies
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox child class click commonfunctions compatible confirmationcodegeneration content contenttype control countryselector courier css database datagrid datagridview datagridviewcheckbox datalist deadlock development dgv dropdownmenu dynamic edit expose feedback findcontrol flash flv form formatdecimal forms formview google grid gridview homeedition hosting iframe iis javascript jquery list maps menu mobile mono mssql multistepregistration nameisnotdeclared objects order problem ratings rotatepage save search security serializesmo.table silverlight smartcard sql sqlserver2005 ssl suse textbox tracking typeof unauthorized validation vb.net video view virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopemnt webdevelopment wizard xml youareanotmemberofthedebuggerusers





