473,765 Members | 2,057 Online
Bytes | Software Development & Data Engineering Community
+ 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(ByV al 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 1574
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.goo gle.com...
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(ByV al 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(ByV al ID As String, ByVal PWD As String) As
SqlDataReader
Dim msg
Dim MyConn As New SqlConnection(" Password=;Persi st Security
Info=True;User ID=;Initial Catalog=;Data Source=;")
Dim cmd As SqlCommand = New SqlCommand("Che ckLogin", MyConn)
cmd.CommandType = CommandType.Sto redProcedure

Dim userID As SqlParameter = cmd.Parameters. Add("@uid",
SqlDbType.VarCh ar, 50)
userID.Value = ID
userID.Directio n = ParameterDirect ion.Input

Dim password As SqlParameter = cmd.Parameters. Add("@pwd",
SqlDbType.VarCh ar, 50)
password.Value = PWD
password.Direct ion = ParameterDirect ion.Input

Dim status As SqlParameter = cmd.Parameters. Add("@status",
SqlDbType.VarCh ar, 2)
status.Directio n = ParameterDirect ion.Output

Dim paySchedule As SqlParameter =
cmd.Parameters. Add("@paysch", SqlDbType.VarCh ar, 2)
paySchedule.Dir ection = ParameterDirect ion.Output

Dim empID As SqlParameter = cmd.Parameters. Add("@id",
SqlDbType.VarCh ar, 2)
empID.Direction = ParameterDirect ion.Output

MyConn.Open()
Dim result As SqlDataReader =
cmd.ExecuteRead er(CommandBehav ior.CloseConnec tion)
'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
29117
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 gathering info with the following: <form method="POST" action="upload_ok.asp" name="frmUpload" enctype="multipart/form-data"> <input type="hidden" name="cmdSearch" value="SearchValue"> <input type="hidden" name="cmdName" value="NameValue">
1
2922
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
10011
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 server. What is the approach for this in asp.net? The comments in MSDN on using the session object are scary, imagining that several users at the same time will use plenty of space on the server's memory! Or is it realistic to memorize the data in a...
4
2354
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 aspx page. When the user clicks this hyperlink i need to populate the bottom aspx pagebased on the user imputs. So i need to pass the values from the top aspx page to bottom aspx page. how can i achieve this. Please give some ideas...
2
3013
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 inetpub\anotherproject\test.aspx
19
2532
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 GetCategories() { SqlConnection conn = new SqlConnection("Data Source=DEVSERVER;Initial Catalog=XXXX;User ID=X;Password=Y");
5
1740
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 linkbutton for a news item is clicked, it redirects to another page news.aspx, the news user control is also on this page. Question: when the user clicks the edit linkbutton in the user control
3
1732
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. We also write them to files for use by other teams. Here it goes - we use these files also as a means of passing the data to other stages in our own program.
4
4163
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 works real good. Since I don't need the aspx page to do any postback, is there a way to pass a parameter to it with out it finishing the round trip back to the htm page? Thanks. -- moondaddy@newsgroup.nospam
0
9568
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10164
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9835
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8833
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7379
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5277
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.