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 ???
Ben Walters - 26 Sep 2007 04:46 GMT
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,
> Hi Friends,
> I want to be able to delete the data in the database once
[quoted text clipped - 33 lines]
>
> What could be wrong in this case ???
Tam - 26 Sep 2007 18:08 GMT
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 ??
> Hey Tam,
> Sounds like it could be an issue with the security trust level in the form
[quoted text clipped - 39 lines]
> >
> > What could be wrong in this case ???
S.Y.M. Wong-A-Ton - 28 Sep 2007 07:49 GMT
To get the rid of the red cross, you need to add that root certificate to the
Trusted Root Certification Authorities store. Read this article
http://www.microsoft.com/technet/prodtechnol/ie/reskit/6/part2/c06ie6rk.mspx
. It may help you understand a bit how certificates work and how you can
install them.
---
S.Y.M. Wong-A-Ton
> 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
[quoted text clipped - 46 lines]
> > >
> > > What could be wrong in this case ???