Cannot delete data using the code on a network

T

Tam

Hi Friends,
I want to be able to delete the data in the database once the
user loads the form on the network from the tables to which he submits the
data To.

I have the following code as the script which does the job :
Sub XDocument_OnLoad(eventObj)
DeleteContentsFromDataBase "Test_Plan"
DeleteContentsFromDataBase "Test_Group"
End Sub

Public Function DeleteContentsFromDataBase(TableName)
MySQL = "DELETE * FROM "& TableName
Const adOpenStatic = 3
Const adLockOptimistic = 3
Set objRecordSet = Nothing
MyDatabaseFilePathAndName = "\\Two\Automation\Databases\TestInput.mdb"
Set objConnection = CreateObject("ADODB.Connection")
Set MyDatabase = CreateObject("ADODB.Recordset")
MyConnection = "Provider=Microsoft.Jet.OLEDB.4.0;"
MyConnection = Myconnection & "Data Source=" & MyDatabaseFilePathAndName & ";"
MyDatabase.Open MySQL,Myconnection,adOpenStatic,adLockOptimistic
End Function


I am able to achieve the functionality on my local system but when users
open the form on a network it doesnt delete the data from tables. Users are
able to submit the data over the nework once I manually clean up the data.
When I execute the same script function DeleteContentsFromDatabase over the
network by other means (script debuggers) the function works so there is no
question of security etc.,

What could be wrong in this case ???
 
B

Ben Walters

Hey Tam,
Sounds like it could be an issue with the security trust level in the form
template. When you have the form in design mode make sure it's set to full
trust.

Cheers,
 
T

Tam

I have given full trust on the form and digital signature is enabled with a
temporary signature but I get this message with a RED Cross when I view the
certificate.
This CA Root certificate is not trusted because it is not in the Trusted
Root Certification Authorities store.
Is there anything I can do to get this resolved ??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top