웹 사이트의 테이블을 채우기 위해 "select"문에서 특정 요소를 추출하려고합니다. 나는 Classic ASP를 사용할 것이다.레코드 세트의 특정 요소 찾기, 클래식 ASP
예를 들어, 아래의 선택 문은이 값을 반환합니다.
알렉스 Alex123이
이제 내 웹 페이지에, 나는 테이블이 같은 것을보고 싶지 이름 ID,
이름 닉네임 ID 주소 알렉스 "입력 필드"Alex123 "입력 필드"
내 HTML 코드에서 나는 이런 식으로 할 것을 기대하고 있습니다. 내가 어떻게 할 수 있니?
<tr>
<td> "some code to extract "Alex" from the recordset"</td>
<td> <input blalbalba> </td>
<td> "some code to extract "Alex123" from the recordset"</td>
<td> <input blabalba> </td>
</tr>
다음은 내 연결 문자열과 선택 문입니다.
Set Con = CreateObject("ADODB.Connection")
Con.ConnectionString = "Provider=SQLOLEDB;Data Source=YOONGTAT\SQLEXPRESS;Database=testing;User ID=sa;password=1234"
Con.open
set rs=Server.CreateObject("ADODB.Recordset")
rs.Open "Select * from dbo.exampletable where user_name like '%" & Request.Form("employeeName[]")(i) & "%' and user_id like '%" & Request.Form("employeeId[]")(i) & "%'" , con
이것은 아마도 당신이 찾고있는 것입니다 : http://stackoverflow.com/questions/13405736/classic-asp-to-pull-data-from-database –