Friday, February 24, 2012

Data types Differences

I've recently installed a new server for an aplication we used at work. In the old server we had SQL Server 2000; for the new one we bought SQL Server 2005. Everything is ok till now, the aplication has worked ok; all ok except one thing.

I have a report in excel, all the format of the report is saved on one table, that table has fields bit, smallint, tinyint, varchar. Now if I try to make the report all the information is ok but the format it's messed. I think that maybe the application might be interpreting the information wrong. I don't have the sources of the application, so cannot debug it.

If I make the report but on the old server, the report appears ok.

Did something on these types (bit, tinyint,varchar,smallint) change from 2000 to 2005?

What can be happening?

Nothing about these types have changed. You might try running profiler against both servers, comparing the statements sent to the server, and then executing the queries from query analzyer/managment studio. Perhaps the results of the queries used to build the report are different in some respect.

|||

I'm not sure if you're saying that the data is in Excel and you're accessing it from SQL Server or the data is in SQL Server and you're accessing it in Excel.

If the data is in Excel and you're accessing it from SQL Server, you may have an issue based on the way you're doing it. If the data is in SQL Server and you're accessing it from Excel, check the compatibility flag on the database. Was this database upgraded from 2K to 2K5 or is it native 2K5?

Buck

|||

No the data is in SQL Server, the aplication access it and create a report on excel. I installed the SQL Server from zero in the new server but the database came from a SQL Server 2K.

Thank you both for reply.

|||

Then I recommend changing the compatibility setting on the database. Also - ensure that the system with the Excel report has the latest MDAC pack on it.

As an aside, I reccomend that you use a different client than Excel to access SQL Server. Microsoft Office applications can tend to escalate locks unacceptably.

Buck

|||

Mr. Halmans, I've run the profiler in both servers and seems to be the same, there are no differences in the statements or the results.

What about the binary type? Any changes? 'cause the report seems to select and update some binary field on one table.

Mr Woody, I'm not using Excel to extract information from the SQL, one application does the extraction and just use excel to present it, but all the information about the format of the excel cells (size, type, formula, etc) are saved in the data base. Right now the report appears with the right information but with no format at all.

No comments:

Post a Comment