S
sam
I not familiar at ASP.Net 1.1 because I were ASP 3.0 programmer.
I just wanna get 1st record in data but I don't know to code at ASP.Net 1.1
ASP 3.0
-------
Set rsFILE = Server.CreateObject("ADODB.Recordset")
rsFILEstatm = "SELECT * FROM F4111 ORDER BY ILUKID DESC"
rsFILE.Open rsFILEstatm, ConnAS400
rsFILE.movefirst
lastnum = CDbl(rsFILE("ILUKID"))
rsFILE.close
Set rsFILE = Nothing
Set rsFILEstatm = Nothing
Asp.Net 1.1
-----------
Dim constrDBL As String = "server='SQLSVR'; Database='JDE_ERP'"
Dim sqlconDBL As System.Data.SqlClient.SqlConnection = New
System.Data.SqlClient.SqlConnection(constrDBL)
Dim sqlcmdDBL As System.Data.SqlClient.SqlCommand = New
System.Data.SqlClient.SqlCommand("SELECT * FROM F4111 ORDER BY ILUKID DESC",
sqlconDBL)
Try
sqlconDBL.Open
Dim dbrDBL As System.Data.SqlClient.SqlDataReader =
sqlcmdDBL.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
Do While dbrDateFr.Read
' How to write get first record then exit
Loop
sqlcmdDBL = Nothing
dbrDBL = Nothing
Finally
sqlconDBL.Close
sqlconDBL.Dispose()
End Try
constrDBL = Nothing
sqlconDBL = Nothing
Please guide me.
Many thanks.
I just wanna get 1st record in data but I don't know to code at ASP.Net 1.1
ASP 3.0
-------
Set rsFILE = Server.CreateObject("ADODB.Recordset")
rsFILEstatm = "SELECT * FROM F4111 ORDER BY ILUKID DESC"
rsFILE.Open rsFILEstatm, ConnAS400
rsFILE.movefirst
lastnum = CDbl(rsFILE("ILUKID"))
rsFILE.close
Set rsFILE = Nothing
Set rsFILEstatm = Nothing
Asp.Net 1.1
-----------
Dim constrDBL As String = "server='SQLSVR'; Database='JDE_ERP'"
Dim sqlconDBL As System.Data.SqlClient.SqlConnection = New
System.Data.SqlClient.SqlConnection(constrDBL)
Dim sqlcmdDBL As System.Data.SqlClient.SqlCommand = New
System.Data.SqlClient.SqlCommand("SELECT * FROM F4111 ORDER BY ILUKID DESC",
sqlconDBL)
Try
sqlconDBL.Open
Dim dbrDBL As System.Data.SqlClient.SqlDataReader =
sqlcmdDBL.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
Do While dbrDateFr.Read
' How to write get first record then exit
Loop
sqlcmdDBL = Nothing
dbrDBL = Nothing
Finally
sqlconDBL.Close
sqlconDBL.Dispose()
End Try
constrDBL = Nothing
sqlconDBL = Nothing
Please guide me.
Many thanks.