ANSI/OEM code page error when creating nav2.6 db on SQL2000

g_dreyerg_dreyer Member Posts: 123
edited 2005-04-21 in Navision Financials
I get the following error, when trying to create a new database:

"The current ANSI or OEM code page on your computer does not match the 0 code page on the <server name> server.
You must ensure that either the ANSI or OEM code page matches the server code page."

I'm not sure how to handle this, can someone help?

Comments

  • trifftriff Member Posts: 23
    To use SQL2000 with navision 2.60 you need to apply service pack 3. This consists of two dlls which you copy into the Navision program folder.


    Paul Baxter
  • ovidovid Member Posts: 1
    in our german setup, we used compatible collation cp850 on our sql2000 server. on a win2k workstation i did a "chcp 850" (which changed the codepage to the correct one) and then the task went ok...

    hope that helps
  • g_dreyerg_dreyer Member Posts: 123
    Thanks for the help/info. Greatly appreciate it!

    I'm now running NF2.6D and it sorted out the problem.
    (So I guess it was the dll's that did not communicate so well with SQL2000)

    I apologise for replying so late, but it took me a while to download / test NF2.6D from our NTR's site.

    Cheers.
  • trifftriff Member Posts: 23
    Be careful using NF2.60D as it changes the structure of the data held on the SQL server. You can not go back to using 2.60C, except for backing up and restoring. All the clients need to be upgraded at the same time.
    If you customers use a client other than NF2.60D then there is potential for yours and their databases acting differently. As a rule you should ALWAYS develop on the same versions as you customer is using.

    Paul Baxter
  • g_dreyerg_dreyer Member Posts: 123
    Thanks Paul for your input.

    We are using the same version as our clients, but I did not know that it so important to use the same patch (i.e. A,B,C,D) as the client (for connecting to the database).

    Thanks for pointing that out to me.

    Cheers,
    Gustav
  • trifftriff Member Posts: 23
    In most situation then useing a different client to your customers makes no difference BUT navision 2.60D uses different keys on the SQL server than other versions of 2.60 That is why you can not go back to another client.It does not take much imagination to see how 2.60d could difer from 2.60c.
    Another example in which I have had experiance is that a local database acts differntly to one using SQL, so if your customer if using SQL you should ALWAYS develop using SQL.

    Paul Baxter
  • g_dreyerg_dreyer Member Posts: 123
    Hi Paul,

    Could please tell me a bit more about the different keys that 2.6D uses? as I restored a 2.6D database on to SQL7.0 and with Enterprise manager compared it with another 2.6B database on the same SQL7.0 server but could not spot the difference.

    Thanks again for your input.
    -Gustav
  • trifftriff Member Posts: 23
    2. Development Environment and Database Changes
    P1) The Query Optimizer SELECT/UPDATE/DELETE Problem
    Error
    When using the SQL Server option SELECT, UPDATE or DELETE, statements occasionally took a very long time (up to 15-30 minutes, depending on the amount of data in the table) on the server. This was caused by Microsoft SQL Server maintaining incorrect statistics on indexes, which led to the use of an incorrect execution plan.

    This has been corrected
    Changing the statement sequence when creating indexes has solved the problem. To remove the problem from existing indexes, functionality has been added to the File – Database – Information – Tables - Optimize button that rebuilds indexes, and it now recreates the statistics correctly.
    To benefit from this fix, run the Optimize function on all major tables after the database has been upgraded.
  • g_dreyerg_dreyer Member Posts: 123
    Thanks Paul,

    I saw that in the ChangesInNF260D.doc document, but did not know you were refering to the above. I thought you were refering to the way in which the flow fields are being stored.

    You don't perhaps know of an 'easy' way to retrieve flow fields from the SQL server (i.e. automatically generating views instead of letting the user build queries to retrieve info for a web page).

    Your input would be very valuable to me.
    -Gustav
  • trifftriff Member Posts: 23
    There is no easy way to get flow fields from SQL server for web interfaces etc. What you have to do is write a select statement to get the data from the underlying tables. Which is what navision is doing in effect.
    I don’t know too much about SQL but it may be possible to use a stored procedure, (which are processed on the server) to calculate the flow fields.


    Paul Baxter

    [This message has been edited by triff (edited 29-03-2001).]
  • trifftriff Member Posts: 23
    Well What do you know you can create a view and recreate the flow fields. I used the SQL Enterprise manager and created a view using two tables and can sum or count the entries in the underlying table.

    So that would work.

    Paul Baxter
  • g_dreyerg_dreyer Member Posts: 123
    Thanks again Paul,

    While we are on the subject...

    Do you have a script that automates this? I.e. process the navision table text file and write a .sql text file that will create the views when you execute it.

    I am trying to do this and it is harder than it seems as Navision uses more than one table and the joins become a bit scary. I have tried with the customer table (18) and it is very difficult.

    Thanks for your help.
    - Gustav
  • trifftriff Member Posts: 23
    Yes I see what you mean but I think writting a script is going to be much harder that creating a view and storing it.
    It should only take a couple of mins to crate a view of the tables from a text export of a navsion table.

    The other option is to write your sql statement to retieve only the fields you require such as
    SELECT Customer."No.", Sum("Cust. Ledger Entry"."Debit Amount (LCY)") WHERE ( "Cust. Ledger Entry"."Customer No." = Customer."No.");

    Which should be easier to do.

    Paul Baxter
  • g_dreyerg_dreyer Member Posts: 123
    What I meant with the script is to AUTOMATICALY generate the sql statements from the nav .txt tables that looks something like this...

    CREATE VIEW dbo.vCustomer
    AS
    SELECT CRONUS$Customer.[No.] AS No,
    CRONUS$Customer.Name,
    CRONUS$Customer.[Phone No.] AS PhoneNo_,
    CRONUS$Customer.[Search Name] AS SearchName,
    CRONUS$Customer.[Name 2] AS Name2,
    ...
    CRONUS$Customer.Reserve,
    SUM([CRONUS$Cust. Ledger Entry].Amount) AS Balance,
    SUM([CRONUS$Cust. Ledger Entry].[Amount (LCY)])
    AS Balance_LCY_, SUM([CRONUS$Cust. Ledger Entry].Amount)
    AS NetChange,
    SUM([CRONUS$Cust. Ledger Entry].[Amount (LCY)])
    AS NetChange_LCY_,
    SUM([CRONUS$Cust. Ledger Entry].[Sales (LCY)])
    AS Sales_LCY_,
    ...
    FROM CRONUS$Customer LEFT OUTER JOIN
    [CRONUS$Cust. Ledger Entry] ON
    CRONUS$Customer.[No.] = [CRONUS$Cust. Ledger Entry].[Customer No.]
    GROUP BY CRONUS$Customer.[No.], CRONUS$Customer.Name,
    CRONUS$Customer.[Phone No.],
    CRONUS$Customer.[Search Name],
    CRONUS$Customer.[Name 2], CRONUS$Customer.Address,
    CRONUS$Customer.[Address 2], CRONUS$Customer.City,
    ...
    etc.

    and this you could open up in Query Analyser from MSSQL to run once off to create ALL your views.... well... until you added another flowfield in your database, then you will export all table information, process the .txt file, generate a .sql file which you again run in Query Analyser.

    I have started with this using awk as my scripting tool. But I have postponed this for now. I was just wondering if you might have done this already.

    Regards
    - Gustav
  • trifftriff Member Posts: 23
    No I have not done this.
    But would be useful if you could get it working.

    Paul Baxter
  • RainaRaina Member Posts: 18
    I'm getting the same error when using 3.10A with SQL2000 - any suggestions?
  • orossiorossi Member Posts: 12
    triff wrote:
    To use SQL2000 with navision 2.60 you need to apply service pack 3. This consists of two dlls which you copy into the Navision program folder.


    Paul Baxter

    Hi! I'm using version 2.6B and I get the same message when trying to create a new database in SQL. Can you please tell me wich dll's had to be copied and where to find them? Thanks a lot for you response!

    Regards.
    Osvaldo.
    Osvaldo Rossi
  • sahibeksahibek Member Posts: 13
    I can't connect my NF 2.60F to SQL 2000 :roll:
  • AsallaiAsallai Member Posts: 141
    g_dreyer wrote:
    I get the following error, when trying to create a new database:

    "The current ANSI or OEM code page on your computer does not match the 0 code page on the <server name> server.
    You must ensure that either the ANSI or OEM code page matches the server code page."

    I'm not sure how to handle this, can someone help?

    Hi All,

    I have the same error when I'd like to use the SQL Server.
    What was the clue? What .dll is need for me or where can i setup my SQL server option? :shock:
    Thank you!
    Andras
Sign In or Register to comment.