Hi, how are you?
I am having a really funny serious problem.
I am just trying to get a value of record, which is WineryID from database.
I always get wrong data. I don't know why.
I did like:
code:
<%
''''''''''''''''''''''''''''''''''''''''''''''''''
'Setting up connection and recordset
''''''''''''''''''''''''''''''''''''''''''''''''''
Set conn = Server.CreateObject("ADODB.Connection")
conn.Provider = "Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.mappath("../../db/wine.mdb"))
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "SELECT * FROM Wine_Winery"
rs.Open sql, conn
%>
<h2>Add New Wine to Winery</h2>
<form method="post" action="Add_wine_to_winery2.asp">
<table>
<%
''''''''''''''''''''''''''''''''''''''''
'Here try to get WineryID into table
''''''''''''''''''''''''''''''''''''''''
For Each x in rs.Fields %>
<%If x.name="WineryID" Then%>
<tr>
<td><%=x.name%>:</td>
<td><%=x.value%></td>
</tr>
<%End If
Next%>
</table>
This is a part of code. Filed name appers fine. It says WineryID. But the value itself is totally wrong. Pick up wrong number. What kind of things do I have to check?? Thanks.
Hiroki Kozai