Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL server slow-down on VFP...
Message
De
24/05/1999 03:58:16
 
 
À
23/05/1999 12:25:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00221775
Message ID:
00222003
Vues:
33
Hi Scott,


>Wow. Your desciption is very close to mine. The only difference I can spot is that you said that it is fast to update and existing record - memo contents or not.

Yes. I just tesed it again.

>
>Chen, in your situation, what is the default value on your memo contents field(the sql table text field at the server).
>
>Is it NULL? (Meaning does the field allow null values and have no default value) Or, do you have a default value for the field at the server?


I define a default as '' (blank string), and bind this default to the text field. The text field does NOT allow NULL.

>
>If you have a default value, so that the server does not insert a NULL when the memo is not used, then you and I have the exact same problem.

But I did notice that you said that when you set a default value on the server, your problem go away. The problem goes away with remote view or SPT? If you have default text and you can use remote view without problem, I would say my situation is worse than yours.

I also need to import data from Access. I set up a Access ODBC, use SPT to get a cursor containg the data from Access. I then scan the cursor, SQLExec() to insert each record into the very same problematic talbe on the SQL Server, and OFTEN the problematic text field is non-blank. Therefore, for my situation, I can conclude that I have problem with remote view but not with SPT.

In thread No. 150117, Brad replied me with the following:

"I ran into the same situation and originally wrote a small routine that used SPT that issued an update
setting the memo field to ''. The issue seemed to only occur when the memo field allowed NULL, and
was updating the NULL value. I presume it is a problem in the ODBC driver, as the update is
instantaneous with SPT.

My second solution proved a little more practical as I defined the memo fields as NOT NULL with a
DEFAULT '' clause. This solved the problem for me."


Chen

>
>Please let me know.
>
>Thx for your input.
>
>Scott Barker.
>
>>Hi Scott,
>>
>>A few months ago I posted a similar question here, but did not get it sovled.
> I have VFP5a (sp3) + SQL Server 6.5. Using remote view with a memo(text) field, I got these observation:
>>
>>1- It is slow to insert a new record with non-blank memo contents, to the point that I can see the intens hard disk activities for up to five minutes on the server.
>>
>>2- It is fast to insert a new record if the memo field is empty.
>>3- It is fast to update an exsiting record with or without memo contents.
>>
>
><< rest deleted >>
Chen Nan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform