August 31, 2004 at 1:04 pm
Has anyone hit this error while using ODBC connection?
If so, how do you fix it? Or what might be causing it?
TIA
Beth
September 1, 2004 at 7:56 am
Does this make sense?:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_foxhelp/html/err2031.asp
If not be more specific as to what's going on, how are you connecting and from what - a VB app, access, Excel etc. Is this new development? have you ever connected.
Hope this helps.
Francis
September 1, 2004 at 8:00 am
I will check this on the server and see if it is the problem.
Thank you for the help.
September 1, 2004 at 10:22 am
Alright, after much searching, both on the server and
on the interent, I can not tell if this is being done.
I am calling a connection from VFP to SQL server. The connection
works just fine. The first program called, deletes the database
and rebuilds it with a blank record in each table.
The second program, which records this message, is called directly
after the first. This program makes the connection again, and
starts inserting records as recieved from another program. The
amount of time between between the end of the first program and
the start of the second program is less then 1 second.
Does that help?
September 1, 2004 at 10:30 am
September 1, 2004 at 10:47 am
I looked, but what I see is a question about forms in vfp. My question is about SQL Server.
Could you give me the synopsys of the question and possible answer.
TIA
September 1, 2004 at 12:51 pm
Beth. I am not a Foxpro expert. But based on the message and the discussion it would seem to me that this is not a SQL Server issue but a FoxPro issue dealing with a child form interferring with a main form. Read the accepted answer in the link and see if it makes sense for you. If you do do not have an open child form, then try ensuring your open form is modal. Modal forms require user input. A modal form has exclusive focus until it is dismissed. If a form is always to be used modally, set the WindowType property to 1. Otherwise, use the optional parameter of the form's show method:
oForm.Show(1)
Does anyone else want to comment on my suggestion?
Francis
September 1, 2004 at 1:17 pm
Basically it sounds like a timing issue.
You are running two programs that use the same database. But the first one drops the database and rebuilds it. It looks like the second program isn't waiting for the first to finish before it executes. If both programs are being 'called' by the same script, then the issue is that once once is sent to SQL Server, the calling program assumes everythng worked fine and calls the second one. This is because the work is done on SQL Server and not on the calling program's computer. One solution is to have a 'wait' in your program to slow down the second program. Or see if you can get something returned from SQL Server when the first program completes.
-SQLBill
September 2, 2004 at 10:14 am
Okay, I figured it out. It has nothing to do with SQL Server, except the fact that the code within the
program to connect to the SQL Server, had two lines in there. The lines were for a wait window in VFP to
come up, which DLLs in VFP do not allow. I comment them out, add code for the error to go to the error
file, and I don't get the message.
Thanks for all the help.
I started commenting out all code to sql server to find this. Finally this
morning I reallized that there was a much easier method. Found the error with the first run after using
it.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply