Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automation Server/ ADO-SQL
Message
From
20/11/2001 09:44:00
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00582134
Message ID:
00583902
Views:
20
John thanks for replay!

Let me describe a situation with it.
I use automation server wich is regestered as server component and anabled for remote access from the client machine. My client application (form) has a property (contact), which actually reference for my remote object.
in my code I do ThisForm.Contact = CREATEOBJECT("as.Contacts")
Everything works fine. My contacts class has a methid which will save info runnig SP with a many parameters.

It looks like:
FUNCTION NewContact(oNC)
oCommand = CREATEOBJECT("ADODB.Command")
oCommand.ActiveConnection = This.oConn
oCommand.CommandType = 4
oCommand.Parameters.Append( oCommand.CreateParameter("ContactID", 3, 1, 4, oNC.ContactID ) )
oCommand.Parameters.Append( oCommand.CreateParameter("Title", 200, 1, 25, ALLTRIM(oNC.Title)) )
oCommand.Parameters.Append( oCommand.CreateParameter("ContactType", 3, 1, 4, oNC.ContactType ) )
oCommand.Parameters.Append( oCommand.CreateParameter("Organization", 200, 1, 25, ALLTRIM(oNC.Organization)) )
oCommand.Parameters.Append( oCommand.CreateParameter("Department", 200, 1, 25, ALLTRIM(oNC.Department)) )
oCommand.Parameters.Append( oCommand.CreateParameter("FirstName", 200, 1, 20, ALLTRIM(oNC.FirstName)) )
oCommand.Parameters.Append( oCommand.CreateParameter("LastName", 200, 1, 20, ALLTRIM(oNC.LastName)) )
oCommand.Parameters.Append( oCommand.CreateParameter("Address1", 200, 1, 30, ALLTRIM(oNC.Address1)) )
oCommand.Parameters.Append( oCommand.CreateParameter("Address2", 200, 1, 20, ALLTRIM(oNC.Address2)) )
oCommand.Parameters.Append( oCommand.CreateParameter("City", 200, 1, 20, ALLTRIM(oNC.City)) )
oCommand.Parameters.Append( oCommand.CreateParameter("State", 200, 1, 2, ALLTRIM(oNC.State)) )
oCommand.Parameters.Append( oCommand.CreateParameter("Zip", 200, 1, 10, ALLTRIM(oNC.Zip)) )
oCommand.Parameters.Append( oCommand.CreateParameter("Email", 200, 1, 50, ALLTRIM(oNC.Email)) )
oCommand.Parameters.Append( oCommand.CreateParameter("Phone", 200, 1, 10, ALLTRIM(oNC.Phone)) )
oCommand.Parameters.Append( oCommand.CreateParameter("Extension", 200, 1, 5, ALLTRIM(oNC.Extension)) )
oCommand.Parameters.Append( oCommand.CreateParameter("Fax", 200, 1, 10, ALLTRIM(oNC.Fax)) )
oCommand.CommandText = "NewContact"
oCommand.Execute
oCommand = .NULL.
ENDFUNC

Now when I run it first time it works fune and fast when I run it second time it hangs up for an about 20-30 seconds and then works. So my real complain is not that something is not working, but how can I escape these delays, and what did i do wrong, which probably the main reason of having them (delays).
However during the delay when you click on foxpro window it says gives you a message that application is busy Switch/Retry and when you press retry adventually it does the job.
XO4Y BCE 3HATb,YMETb,IMETb!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform