|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
Wouldn't it just be "SELECT * FROM myTable WHERE IDNumber = 1223" Or am I missing something?
|
|
#3
|
|||
|
|||
|
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 |
|
#4
|
||||
|
||||
|
Don't you need to bind your returned recordset to the textbox's?
|
|
#5
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft SQL Server > SQL query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|