G
Guest
I have a sub named ConnectToDb which has my db connections commands in it.
When I call it from another page that sub routine will not execute and i can't connect to the DB via that sub.
why is it not allowing me to connect?
code:
public sub ConnectToDB()
conn.connectionstring = ConfigurationSettings.AppSettings("DB")
conn.Open
end sub
the code i'm calling it from
sub GetData()
db.ConnectToDB()
'code to call SP's and bind grids
end sub
nothing happens this way, why not?
When I call it from another page that sub routine will not execute and i can't connect to the DB via that sub.
why is it not allowing me to connect?
code:
public sub ConnectToDB()
conn.connectionstring = ConfigurationSettings.AppSettings("DB")
conn.Open
end sub
the code i'm calling it from
sub GetData()
db.ConnectToDB()
'code to call SP's and bind grids
end sub
nothing happens this way, why not?