It still doesn't display anything. Here is all my code is aspx.vb part
[code=vbnet]
Imports System
Imports System.Data
Imports System.Data.Sql Client
Imports System.Data.Odb c
Imports System.Data.Dat aSet
Imports System.Data.Dat aTableCollectio n
Imports IBM.Data.DB2.iS eries
Partial Class Parts_Inquiries _OrderDetailInq uiry
Inherits System.Web.UI.P age
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArg s) Handles Me.Load
'Define variable to pass parm from calling page.
Dim OrderNumber As String
OrderNumber = Request.QuerySt ring("ordno")
'If part number passed in plug it into text box
If txtOrderNumber. Text = "" And OrderNumber > "" Then
txtOrderNumber. Text = OrderNumber
End If
'Conditionally return to menu or previous page depending if parm passed in
exitHyperLink.T ext = " Prev"
exitHyperLink.N avigateUrl = "~/Parts/Inquiries/OrderInquiry.as px" & txtOrderNumber. Text & ""
TrackingHyperLi nk.Text = "Tracking"
TrackingHyperLi nk.NavigateUrl = "~/parts/inquiries/TrackingInquiry .aspx?ordno=" & txtOrderNumber. Text & ""
exitHyperLink.T ext = "Exit"
exitHyperLink.N avigateUrl = "~/parts/inquiries/EngineeringInqu iryMenu.aspx"
End Sub
Protected Sub btnSubmit_Click (ByVal sender As Object, ByVal e As System.EventArg s) Handles btnSubmit.Click
Dim connectionStrin g = "DRIVER=Cli ent Access ODBC Driver (32-bit);UID=ODBC;P WD=xxxxxxxxxx;S ystem=xxx.xxx.x xx.xxx"
Dim myconnection As OdbcConnection
Dim myCommand As OdbcDataAdapter
Dim mydataset As New DataSet
Dim sql As String
Dim Order As Integer
Order = CInt(txtOrderNu mber.Text)
sql = "select line#, ordno, quano, quana, quans, c2rdt, unitm, prdno, actsp from rmsfiles2.obcop 200 where ordno = " & Order
Try
myconnection = New OdbcConnection( "DRIVER=Cli ent Access ODBC Driver (32-bit);UID=ODBC;P WD=xxxxxxxxx;Sy stem=xxx.xxx.xx x.xxx")
myCommand = New OdbcDataAdapter (sql, myconnection)
myCommand.Fill( mydataset)
Catch ex As Exception
txtOrderNumber. Text = "invalid order number"
End Try
gridview1.DataS ource = mydataset
gridview1.DataB ind()
gridview1.Visib le = True
End Sub
Function GetData(ByVal mysql As String, ByVal myOrderNumber As Integer) As DataSet
Dim connectionStrin g = "DRIVER=Cli ent Access ODBC Driver (32-bit);UID=ODBC;P WD=xxxxxxxxxxx; System=xxx.xxx. xxx.xxx"
Dim myconnection As OdbcConnection
Dim myCommand As OdbcDataAdapter
Dim mydataset As New DataSet
Dim sql As String
Dim Order As Integer
Order = CInt(txtOrderNu mber.Text)
sql = "select line#, ordno, quano, quana, quans, c2rdt, unitm, prdno, actsp from rmsfiles2.obcop 200 where ordno = " & Order
Try
myconnection = New OdbcConnection( "DRIVER=Cli ent Access ODBC Driver (32-bit);UID=ODBC;P WD=xxxxxx;Syste m=xxx.xxx.xxx.x xx")
myCommand = New OdbcDataAdapter (sql, myconnection)
myCommand.Fill( mydataset)
Catch ex As Exception
txtOrderNumber. Text = "invalid order number"
End Try
Return mydataset
End Function
End Class
[/code]
[code=vbnet]
Imports System
Imports System.Data
Imports System.Data.Sql Client
Imports System.Data.Odb c
Imports System.Data.Dat aSet
Imports System.Data.Dat aTableCollectio n
Imports IBM.Data.DB2.iS eries
Partial Class Parts_Inquiries _OrderDetailInq uiry
Inherits System.Web.UI.P age
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArg s) Handles Me.Load
'Define variable to pass parm from calling page.
Dim OrderNumber As String
OrderNumber = Request.QuerySt ring("ordno")
'If part number passed in plug it into text box
If txtOrderNumber. Text = "" And OrderNumber > "" Then
txtOrderNumber. Text = OrderNumber
End If
'Conditionally return to menu or previous page depending if parm passed in
exitHyperLink.T ext = " Prev"
exitHyperLink.N avigateUrl = "~/Parts/Inquiries/OrderInquiry.as px" & txtOrderNumber. Text & ""
TrackingHyperLi nk.Text = "Tracking"
TrackingHyperLi nk.NavigateUrl = "~/parts/inquiries/TrackingInquiry .aspx?ordno=" & txtOrderNumber. Text & ""
exitHyperLink.T ext = "Exit"
exitHyperLink.N avigateUrl = "~/parts/inquiries/EngineeringInqu iryMenu.aspx"
End Sub
Protected Sub btnSubmit_Click (ByVal sender As Object, ByVal e As System.EventArg s) Handles btnSubmit.Click
Dim connectionStrin g = "DRIVER=Cli ent Access ODBC Driver (32-bit);UID=ODBC;P WD=xxxxxxxxxx;S ystem=xxx.xxx.x xx.xxx"
Dim myconnection As OdbcConnection
Dim myCommand As OdbcDataAdapter
Dim mydataset As New DataSet
Dim sql As String
Dim Order As Integer
Order = CInt(txtOrderNu mber.Text)
sql = "select line#, ordno, quano, quana, quans, c2rdt, unitm, prdno, actsp from rmsfiles2.obcop 200 where ordno = " & Order
Try
myconnection = New OdbcConnection( "DRIVER=Cli ent Access ODBC Driver (32-bit);UID=ODBC;P WD=xxxxxxxxx;Sy stem=xxx.xxx.xx x.xxx")
myCommand = New OdbcDataAdapter (sql, myconnection)
myCommand.Fill( mydataset)
Catch ex As Exception
txtOrderNumber. Text = "invalid order number"
End Try
gridview1.DataS ource = mydataset
gridview1.DataB ind()
gridview1.Visib le = True
End Sub
Function GetData(ByVal mysql As String, ByVal myOrderNumber As Integer) As DataSet
Dim connectionStrin g = "DRIVER=Cli ent Access ODBC Driver (32-bit);UID=ODBC;P WD=xxxxxxxxxxx; System=xxx.xxx. xxx.xxx"
Dim myconnection As OdbcConnection
Dim myCommand As OdbcDataAdapter
Dim mydataset As New DataSet
Dim sql As String
Dim Order As Integer
Order = CInt(txtOrderNu mber.Text)
sql = "select line#, ordno, quano, quana, quans, c2rdt, unitm, prdno, actsp from rmsfiles2.obcop 200 where ordno = " & Order
Try
myconnection = New OdbcConnection( "DRIVER=Cli ent Access ODBC Driver (32-bit);UID=ODBC;P WD=xxxxxx;Syste m=xxx.xxx.xxx.x xx")
myCommand = New OdbcDataAdapter (sql, myconnection)
myCommand.Fill( mydataset)
Catch ex As Exception
txtOrderNumber. Text = "invalid order number"
End Try
Return mydataset
End Function
End Class
[/code]
Comment