473,471 Members | 4,625 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Passing data between .aspx and .vb files

i have login.aspx, login.vb, i have my stored procedures in login.vb

in login.aspx
<%@ Page Language="vb" src="/MyTime/com/login.vb"
Inherits="Enter.MyTime"%>

in login.vb
Public Sub EnterMyTime(ByVal ID As String, ByVal PWD As String)as
dataset

Now i am trying to read the output variables data from login.aspx.
i could not do it. Is there any easy way to use sqlDataReader insted
of Returning a DataSet.

THX.
Nov 18 '05 #1
2 1564
Subs do not return anything so your syntax is incorrect. Show more of your
code so we can show you what to change.

-Stanley

"vengala s reddy" <re******@yahoo.com> wrote in message
news:b9**************************@posting.google.c om...
i have login.aspx, login.vb, i have my stored procedures in login.vb

in login.aspx
<%@ Page Language="vb" src="/MyTime/com/login.vb"
Inherits="Enter.MyTime"%>

in login.vb
Public Sub EnterMyTime(ByVal ID As String, ByVal PWD As String)as
dataset

Now i am trying to read the output variables data from login.aspx.
i could not do it. Is there any easy way to use sqlDataReader insted
of Returning a DataSet.

THX.

Nov 18 '05 #2
Public Function EnterMyTime(ByVal ID As String, ByVal PWD As String) As
SqlDataReader
Dim msg
Dim MyConn As New SqlConnection("Password=;Persist Security
Info=True;User ID=;Initial Catalog=;Data Source=;")
Dim cmd As SqlCommand = New SqlCommand("CheckLogin", MyConn)
cmd.CommandType = CommandType.StoredProcedure

Dim userID As SqlParameter = cmd.Parameters.Add("@uid",
SqlDbType.VarChar, 50)
userID.Value = ID
userID.Direction = ParameterDirection.Input

Dim password As SqlParameter = cmd.Parameters.Add("@pwd",
SqlDbType.VarChar, 50)
password.Value = PWD
password.Direction = ParameterDirection.Input

Dim status As SqlParameter = cmd.Parameters.Add("@status",
SqlDbType.VarChar, 2)
status.Direction = ParameterDirection.Output

Dim paySchedule As SqlParameter =
cmd.Parameters.Add("@paysch", SqlDbType.VarChar, 2)
paySchedule.Direction = ParameterDirection.Output

Dim empID As SqlParameter = cmd.Parameters.Add("@id",
SqlDbType.VarChar, 2)
empID.Direction = ParameterDirection.Output

MyConn.Open()
Dim result As SqlDataReader =
cmd.ExecuteReader(CommandBehavior.CloseConnection)
'MyConn.Close()
Return result

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Steven K | last post by:
Hello, I am using an asp page (upload.asp) to gather information and to upload files to the web server using SoftArtisans SAUpload Tool. In the first page (upload.asp), I have a form for...
1
by: Newbie | last post by:
Is there a way to pass strings from one webform to another without using Response.Redirect( ) ? The reason is that I need the webform passing the string to close its window.
5
by: cgia | last post by:
I am porting an old client/server application to asp.net. I used to retrieve data into local tables (Paradox table-files on the client's disk) and work on them before saving them back to the...
4
by: Gibs | last post by:
Hi I have two aspx pages in a frame and in the top page i am creating the controls dynamically and putting in a place holder. I have a hyperlink in this page to populate the data in the bottom...
2
by: Roy | last post by:
Hey all, Is it possible to pass session variables between pages in separate projects? For example: inetpub\thisproject\blah.aspx has a session variable and response.redirects the user to...
19
by: Jaime Stuardo | last post by:
Hi all.. I have created a business logic component that is used from my ASP.NET webform. It works, but connection string to the database is hard coded, as in this method : public DataSet...
5
by: Ludwig | last post by:
I have a user control news.ascx that lists news items, and it has add/edit/delete linkbuttons. This user control is on the default.aspx page together with other user controls. When the edit...
3
by: iu2 | last post by:
Hi all, I need your professional opinion about this. It is more a general programming dilemma rather then a C++ one, but since the project I write is in C++... We handle big structs of data....
4
by: moondaddy | last post by:
I have a htm page where I need to pass some data to an aspx page as a means of sending data to the database. I don't need to see the aspx page so I was going to put it in a hidden iframe. This...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
1
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.