SQLServer error and crashing

General discussion forum about all databases other than SqlBase.
ProjectionAU

SQLServer error and crashing

Post by ProjectionAU » 30 Aug 2011, 09:58

Hello,

SQLServer 2008 R2.

My application crash when i'm trying to fetch data from any table returning more than 100 records.
The crash comes on line
"While SqlFetchNext( ghSql1, nDummy )".

Also, I get 'Work space limit exceeded' error when excuting a simple insert statement (but not all the time).

We already installed td60 sp3 but still getting the error.
Have anyone encountered this before?

Thanks in advance.
You do not have the required permissions to view the files attached to this post.

Jeff Luther

Re: SQLServer error and crashing

Post by Jeff Luther » 30 Aug 2011, 21:33

We already installed td60 sp3 but still getting the error.
How did you install SP3? If you did an update over your SP2 installation, I would suggest that you uninstall TD v6, then do a full/complete install of SP3. It is possible -- if you did an update only -- that something may be out of sync...
'Work space limit exceeded' error
Could be another indication of a setup or config. issue. Did you try SQLTalk, for example, and do Select * on your table from that program?

Just a guess, because the only time some reports something like this is when there is a setup/install/config. issue. If this were a general problem, this forum would be overloaded with reports, I am sure. How do you know about the 100 rows? Your loop exits at 1000 and I don't see any field etc. being assigned to show how far you get.

One other thing in your report caught my eye:
SQLServer 2008 R2
I know TD v6 supports MS SS 2008, I just never heard anyone refer to "R2" before. Let me check internally to be sure this isn't perhaps the issue.

Jeff Luther

Re: SQLServer error and crashing

Post by Jeff Luther » 30 Aug 2011, 22:21

REEVALUATION TIME... Looking again at your code... There's a coding error:

2nd param. to SqlFetchNext() is an nIndicator Receive Number (you call it 'nDummy') that is assigned when SqlFetchNext() returns. That nIndicator value provides specific info. in case the Sql call returns FALSE. See Help for details.

Anyway, since you are also using it for some sort of incremental counter, yet it's being (re)set each SqlFetchNext() call, it will never reach 1000, so eventually your SqlFetchNext() call will return FALSE (because it's fetched all the rows in that table) and your msg. box will display n = 1, probably. Why? Because the FETCH constant for EOF = 1 and that's what nDummy is assigned by SqlFetchNext() when it hits the end of the result set.

MORAL: Don't use 'nDummy' for your own counter; it's being used by SqlFetchNext(). Are you sure your TD app is crashing? How many rows in transitem?

ProjectionAU

Re: SQLServer error and crashing

Post by ProjectionAU » 31 Aug 2011, 05:27

Jeff, thanks for the response.

I did not originally have the 'nDummy' as a counter.
It is crashing without that.

Original 'transitem' record have close to a million records.
I mentioned the 100 records because we created a new table and kept adding records till it crashed.
We also tried other tables in case it was data specific.

I'll un-install and re-install TD 6.0 and see what happens after that.

ProjectionAU

Re: SQLServer error and crashing

Post by ProjectionAU » 01 Sep 2011, 02:16

"fetchrow=255' in sql.ini is the line giving me the headache.

It does not matter what value i enter, the application crashes.
I comment the line and my application works fine.

I'm interested to know more about "fetchrow".
Can you please point mo to where i can read more about it?

FYI:
The original sql.ini with the fetchrow line works if i connect to SQLServer 2005 database.
You do not have the required permissions to view the files attached to this post.

Jeff Luther

Re: SQLServer error and crashing

Post by Jeff Luther » 02 Sep 2011, 00:09

You can read about 'fetchrow' for Oracle's entries in the SQL.INI file in the book called ccod.pdf. Look in the Oracle section, then the INI keywords and descriptions.

ProjectionAU

Re: SQLServer error and crashing

Post by ProjectionAU » 02 Sep 2011, 03:58

I've read the document.
I still do not understand why my application crashes.
Why is the 'fetchrow' entry in 'sql.ini' cause crashing to my app when connected to MS SS 2008?
It works for MS SS 2005.
What am i doing wrong? I'd appreciate any comment/explanation.

[odbcrtr]
remotedbname=spmmlive,DSN=spmmlive
odbctrace=off
odbctracefile=sql.log
; fetchrow=250
longbuffer=5120000
enablemultipleconnections=off

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests