Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL 2000 differences

Status
Not open for further replies.

SQLScholar

Programmer
Aug 21, 2002
2,127
GB
Hey all,

I have a VB6 app. If i run it against one SQL server - its fine. Another SQL 2000 server - it fails.

They are both on Windows 2000 servers. I have checked SQL versions with @@version and

SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

Both identical.

The i used components checker to check MDAC versions - both 2.8. Also then checked the related MDAC Dlls. All identical.

What else could be different? Any ideas?

Dan

----------------------------------------
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
 
If could be any of several things. Having the error will be very useful.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Sorry - i wasnt sure it would help. Here is the vb6 code:
(this is in a function, so Frm is the form passed to it

Code:
frm.AdodcTemp.Recordset.Delete adAffectCurrent

The error is

Run time error 3021
Either EOF or BOF is true, or the current recordset has been deleted. Requested operation requires a current record.

Now i have come across this error loads. It has a current record. Also bare in mind that this error can be replicated "at will" on our test server - but on the live server the same series of events does not cause the error. Both times the client (actually its me!) is on the same PC just connecting to the different DB.

Thanks all.

Dan

----------------------------------------
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
 
Well first off you need to test for EOF to prevent this type of error.

First thing I thought is MDAC versions but you said they are the same. How did you test that? The MDAC version tool? If you checked the registry for the version that can misleading.

Do you change your connection strings at all for the production server? And is security the same on production and the dev box?

[sub]____________ signature below ______________
The worst mistake you'll ever make is to do something simply the way you know how while ignoring the way it should be done[/sub]
 
Onpnt,

Thanks for the help.

Some notes from your above message.

Firstly checking for EOF is not really the issue here. This is only failing on the test server, and although EOF will be true is not the point. Even if EOF is true, we still need to delete the line that IS there (i can see it)!

In terms of checking MDAC - i dont know what the "MDAC version tool" is? I used M$ components checker - the one recommended by M$ to check the MDAC version.

And lastly - no the only thing that changes in the connection string is the IP of the server!

Thanks again

dan

----------------------------------------
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
 
Are the database servers the same version, same service pack (for the OS and database)?

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Yep

The O/S is Windows 2000 SP4 on both

The SQL is again the same being:

8.00.2039 SP4 Standard Edition

Dan

----------------------------------------
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
 
Has you checked that the data within the test database isn't different?

Perhaps data that you are expecting is missing?

Perhaps someone has something running that is screwing with the data you are trying to use?

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Denny,

Thanks for your time.

The data that its referring to (that is supposed to be missing, but isnt) was actually inserted a couple of seconds earlier - by the same app. If its not this line that causing it (i am sure it is, as the line is there!) then its still the DB with another line. I am the only person using this database - i also installed the server.

Cant think of anything else - this is stupid :)

Dan

----------------------------------------
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
 
All,

Just to confirm (as the same thing is has been asked on other forums i have posted on (not TT)).

I have taken a backup from our main DB this morning (which works) and moved it (data and all (227meg)) to the test DB (which doesnt work).

Logged onto the test database - still doesnt work!

Any other ideas?

Dan

----------------------------------------
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
 
OK, that's just annoying.

Something is just funky. If it's been backed up and restored it should be working.

Are you getting an error when you execute the command and you are skipping over the error message with an ON ERROR RESUME NEXT?

That's about the only other thing I can come up with off the top of my head.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
This may not be helpful, but I suggest you run this on both servers to see if there is any difference.

Code:
[COLOR=blue]select[/color]  ServerProperty([COLOR=red]'collation'[/color]) [COLOR=blue]As[/color] ServerCollation, 
		DatabasePropertyEx([COLOR=red]'TempDB'[/color], [COLOR=red]'Collation'[/color]) [COLOR=blue]As[/color] TempDbCollation,
		DatabasePropertyEx([COLOR=red]'[!]YourDatabaseNameHere[/!]'[/color], [COLOR=red]'Collation'[/color]) [COLOR=blue]As[/color] MyCollation

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
All,

We seem to have a difference. The working server brings back:

SQL_Latin1_General_CP1_CI_AS SQL_Latin1_General_CP1_CI_AS Latin1_General_CI_AS

and the failing one has

Latin1_General_CI_AS Latin1_General_CI_AS Latin1_General_CI_AS

Where do i go from here? Do we think this is the problem?

Dan

----------------------------------------
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
 
I am going for a clean install of SQL - to get the collations the same.

Wish me luck!

Dan

----------------------------------------
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
 
MRDenny,

No there is absolutely no difference in the code. Both running on the same machine, identical code.

All,

Ok - well since its a test server i did it.

AND..... still doing the same thing. Worth a try.

Any other ideas?

----------------------------------------
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
 
I'm not thinking that there is a difference, but that there is on ON ERROR RESUME NEXT which is skipping some other error further up the client applications procedure (or function).

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
MrDenny,

Thanks for your help.

Surely though if the code is identical - running against identical databases (inc data), then running through the same physical procedure with the system, should yeild the same result. Not one erroring, and one not. Either way we look at this with the code - the code is the same for both systems, yet running differently.

Dan

----------------------------------------
Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
 
I agree it should. But something little thing between the SQL Servers has to be different. That's the only explination. Have you checked the default connection properties between the machines to ensure that they are the same.

I'm not sure what else you can check that would cause errors like this.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top