Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 2nd, 2003, 05:02 AM
ThrillKill ThrillKill is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 2 ThrillKill User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
SQL query

hi im new around here working on a project wonder if you guys can help

working with VB created a txtbox and button,
the question is need to create an SQL query to allow me to check wats in the txtbox and display the rest of the data in some other box's

example if i ether in the txtbox the ID number 1223 and click on the button it would display all the information of ID number 1223 so wondering how do i get it to work????

sorry if it doesnt make much sense help if possible thankz

Reply With Quote
  #2  
Old April 3rd, 2003, 08:11 PM
numbernine numbernine is offline
Up To His Eyes In Ads
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Chicago
Posts: 160 numbernine User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 25 sec
Reputation Power: 7
Wouldn't it just be "SELECT * FROM myTable WHERE IDNumber = 1223" Or am I missing something?

Reply With Quote
  #3  
Old April 4th, 2003, 04:12 AM
ThrillKill ThrillKill is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 2 ThrillKill User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
yeh already knew the query but i want it to return the results in Txt boxes

EG
Select * From Customer Where ID = 1442

hence it returns firstname, secondname, address, sex etc each in different TXt box's

Reply With Quote
  #4  
Old April 5th, 2003, 01:07 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 8 m 57 sec
Reputation Power: 9
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Don't you need to bind your returned recordset to the textbox's?

Reply With Quote
  #5  
Old April 29th, 2003, 07:39 PM
aspnewbie aspnewbie is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: The Great White North
Posts: 361 aspnewbie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 50 sec
Reputation Power: 7
Send a message via MSN to aspnewbie
You said you were working in VB but I'm hoping this might give you some ideas. If I were doing this in vbscript, I would just do

set oRS = Select * from tbl where RecordID =" & ID

<input type="text" value="<%=oRS("LastName")%>" name="sLastName>
<input type="text" value="<%=oRS("FirstName")%>" name="sFirstName">

etc, etc

so I guess in vb you would also set the value of a particular textbox = to the recordset's value for the particular field.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft SQL Server > SQL query


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 5 hosted by Hostway
Stay green...Green IT