.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 31st, 2003, 11:01 PM
PAVAK PAVAK is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 3 PAVAK User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Populating TxtBox from Qry

im not grasping some simple stuff... I have a UserName PassWord UserFirst and UserLast in a SQL DataBase im using a logon screnn to get the username and password then all im trying to do is populate the UserFirst and UserLast into TextBox1 and TextBox2 on the logon page.<br><br>i got myself lost fast

Reply With Quote
  #2  
Old April 7th, 2003, 11:15 PM
PAVAK PAVAK is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 3 PAVAK User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ill try and add some of my code here and see if any one can figure it out for me...<br>' the '*** is the stuff i have added to the code. i have no other ideas other than this as to what to do.<br>' if someone could please i would like to know what i can put in this Qry to get the userfirstname<br><br>' in TblUser there are fields. userlogon, userpass, userfirstname, userlastname, usercity, userstate.<br><br>Function GetUser(ByVal userLogon As String, ByVal userPass As String) As System.Data.DataSet<br> Dim connectionString As String = "server='localhost'; user id='PAVAK'; password='PAVAK'; Database='FacServReq'"& _<br>""<br> Dim sqlConnection As System.Data.SqlClient.SqlConnection = New System.Data.SqlClient.SqlConnection(connectionStri ng)<br> Dim queryString As String = "SELECT [TblUser].* FROM [TblUser] WHERE (([TblUser].[UserLogon] = @UserLogon) AND"& _<br>" ([TblUser].[UserPass] = @UserPass))"<br> Dim sqlCommand As System.Data.SqlClient.SqlCommand = New System.Data.SqlClient.SqlCommand(queryString, sqlConnection)<br> sqlCommand.Parameters.Add("@UserLogon", System.Data.SqlDbType.Char).Value = userLogon<br> sqlCommand.Parameters.Add("@UserPass", System.Data.SqlDbType.Char).Value = userPass<br>'***<br>dim userfirst as string<br>sqlCommand.Parameters.Add("@userfirstname", System.Data.SqlDbType.Char).Value = userfirst<br>TxtFirst.text = userfirst<br>'***<br> Dim dataAdapter As System.Data.SqlClient.SqlDataAdapter = New System.Data.SqlClient.SqlDataAdapter(sqlCommand)<br> Dim dataSet As System.Data.DataSet = New System.Data.DataSet<br> dataAdapter.Fill(dataSet)<br> Return dataSet<br>End Function

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > Populating TxtBox from Qry


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT