Hej <code>vb.net till asp behöver hjälp
Jag undrar om det är någon som kan hjälpa mig att övesätta koden under från vb.net till asp kod.
<%Dim myconnection As New OleDbConnection("provider=microsoft.jet.oledb.4.0; Data Source=" & server.mappath ("sidor.mdb"))
Dim mycommand As New OleDbCommand("select * from sida where sidnr=1", myconnection)
myconnection.Open()
Dim dr As OleDbDataReader = mycommand.ExecuteReader()%>
<%while dr.read%>
<table id="Table3" style="Z-INDEX: 102; LEFT: 288px; WIDTH: 323px; POSITION: absolute; TOP: 163px; HEIGHT: 235px" cellspacing="1" cellpadding="1" width="323" border="0">
<tbody>
<tr>
<td valign="top" colspan="2" height="50">
<%=Replace(dr.item("text"),vbCrlf,"<br>")%>
</td>
</tr>
</tbody>
</table>
<table id="Table2" style="Z-INDEX: 103; LEFT: 287px; WIDTH: 283px; POSITION: absolute; TOP: 130px; HEIGHT: 62px" cellspacing="1" cellpadding="1" width="283" border="0">
<tbody>
<tr>
<td valign="top" colspan="2" height="50">
<%=Replace(dr.item("rubrik"),vbCrlf,"<br>")%>
</td>
</tr>
</tbody>
</table>
<%end while%>Sv: vb.net till asp behöver hjälp
<%
Set db = Server.CreateObject("ADODB.Connection")
connStr = "provider=microsoft.jet.oledb.4.0; Data Source=" & server.mappath ("sidor.mdb"))
db.Open connStr
Set rsquery = Server.CreateObject("ADODB.Recordset")
rsquery.Open = "select * from sida where sidnr=1", db, 3, 3
do while not rsquery.EOF %>
<table id="Table3" style="Z-INDEX: 102; LEFT: 288px; WIDTH: 323px; POSITION: absolute; TOP: 163px; HEIGHT: 235px" cellspacing="1" cellpadding="1" width="323" border="0">
<tbody>
<tr>
<td valign="top" colspan="2" height="50">
<%=Replace(rsquery("text"),vbCrlf,"<br>")%>
</td>
</tr>
</tbody>
</table>
<table id="Table2" style="Z-INDEX: 103; LEFT: 287px; WIDTH: 283px; POSITION: absolute; TOP: 130px; HEIGHT: 62px" cellspacing="1" cellpadding="1" width="283" border="0">
<tbody>
<tr>
<td valign="top" colspan="2" height="50">
<%=Replace(rsquery("rubrik"),vbCrlf,"<br>")%>
</td>
</tr>
</tbody>
</table>
<%loop%>
</code>