J
John Carnahan
Using the ODBC.net data provider to access dbase V tables.
Everything works fine on the develpment system, but I get a security error
on the production system (running XP on both, so MDAC=2.7)
here's the code block that generates an UNHANDLED sercurity exception. I'm
not sure what type of exception to try to trap here... thought
the Security.SecurityException would catch it so I could see what is going
on, but it doesn't.
I also checked the security rights on the production machine, and to the
best I could determine, it has the rights.... but not really sure about
this.
' get the information in TALKNET.dbf
Private Function GetTalkNetInfo(ByVal connStr As String) As DataSet
lbl_usermsg.Text = "Procedure GetTalkNetInfo Retreiving data from
TALKNET.dbf: " + "connection string:" + connStr
Dim ok As Boolean = True
Dim talknetCONN As OdbcConnection = New OdbcConnection()
Dim talknetDA As OdbcDataAdapter
Dim talknetDS As DataSet = New DataSet()
talknetCONN.ConnectionString = connStr
Dim talknetQRY As String = "SELECT * FROM TALKNET WHERE THREADID=100"
talknetDA = New OdbcDataAdapter(talknetQRY, talknetCONN)
Dim talknetCMD As New OdbcCommand(talknetQRY, talknetCONN)
Try
talknetCONN.Open()
talknetDA.Fill(talknetDS, "Talknet")
Catch e As OdbcException
cRetrnmsg = e.Errors(0).Message & " " & e.Errors(0).Source
lbl_usermsg.Text = cRetrnmsg
Catch e As Exception
cRetrnmsg = " & e.Errors(0).Message & e.Errors(0).Source"
lbl_usermsg.Text = cRetrnmsg
Catch e As Security.SecurityException
cRetrnmsg = " & e.Errors(0).Message & e.Errors(0).Source"
lbl_usermsg.Text = cRetrnmsg
Finally
talknetCONN.Close()
End Try
Return talknetDS
End Function
Everything works fine on the develpment system, but I get a security error
on the production system (running XP on both, so MDAC=2.7)
here's the code block that generates an UNHANDLED sercurity exception. I'm
not sure what type of exception to try to trap here... thought
the Security.SecurityException would catch it so I could see what is going
on, but it doesn't.
I also checked the security rights on the production machine, and to the
best I could determine, it has the rights.... but not really sure about
this.
' get the information in TALKNET.dbf
Private Function GetTalkNetInfo(ByVal connStr As String) As DataSet
lbl_usermsg.Text = "Procedure GetTalkNetInfo Retreiving data from
TALKNET.dbf: " + "connection string:" + connStr
Dim ok As Boolean = True
Dim talknetCONN As OdbcConnection = New OdbcConnection()
Dim talknetDA As OdbcDataAdapter
Dim talknetDS As DataSet = New DataSet()
talknetCONN.ConnectionString = connStr
Dim talknetQRY As String = "SELECT * FROM TALKNET WHERE THREADID=100"
talknetDA = New OdbcDataAdapter(talknetQRY, talknetCONN)
Dim talknetCMD As New OdbcCommand(talknetQRY, talknetCONN)
Try
talknetCONN.Open()
talknetDA.Fill(talknetDS, "Talknet")
Catch e As OdbcException
cRetrnmsg = e.Errors(0).Message & " " & e.Errors(0).Source
lbl_usermsg.Text = cRetrnmsg
Catch e As Exception
cRetrnmsg = " & e.Errors(0).Message & e.Errors(0).Source"
lbl_usermsg.Text = cRetrnmsg
Catch e As Security.SecurityException
cRetrnmsg = " & e.Errors(0).Message & e.Errors(0).Source"
lbl_usermsg.Text = cRetrnmsg
Finally
talknetCONN.Close()
End Try
Return talknetDS
End Function