S
Stefan Bosman
Hi,
when i declare a variable in the "pageload event" or in the "Partial Class
_default"
my program will recognize the variable but it will loose the value.
example:
Partial Class _Default
Inherits System.Web.UI.Page
Dim conStr As String =
ConfigurationManager.ConnectionStrings("connString1").ConnectionString
order_id = Session("session_orders")
Dim sqlstr_order As String = "SELECT * FROM Orders WHERE OrdersBaseID="
+ Str(order_id)
Dim sqladapter_order As New SqlDataAdapter(sqlstr_order, conStr)
ds_Order.Reset()
sqladapter_order.Fill(ds_Order, "Orders")
when i use msgbox(sqlstr_order) in an other code it will return an empty
string and loading data of this table will not work.
example:
ds_Order.Tables("Orders").Rows(0)("OrderGammaType") + "'"
everything works fine if i copy the code in the other sub every time i need
data from the table.
thanks in advance
(New dot net programmer)
when i declare a variable in the "pageload event" or in the "Partial Class
_default"
my program will recognize the variable but it will loose the value.
example:
Partial Class _Default
Inherits System.Web.UI.Page
Dim conStr As String =
ConfigurationManager.ConnectionStrings("connString1").ConnectionString
order_id = Session("session_orders")
Dim sqlstr_order As String = "SELECT * FROM Orders WHERE OrdersBaseID="
+ Str(order_id)
Dim sqladapter_order As New SqlDataAdapter(sqlstr_order, conStr)
ds_Order.Reset()
sqladapter_order.Fill(ds_Order, "Orders")
when i use msgbox(sqlstr_order) in an other code it will return an empty
string and loading data of this table will not work.
example:
ds_Order.Tables("Orders").Rows(0)("OrderGammaType") + "'"
everything works fine if i copy the code in the other sub every time i need
data from the table.
thanks in advance
(New dot net programmer)