Using ActiveX Component in VC++ with Nav 2.6e SQL

I have posted this problem before but still have had no luck with a solutions, so I thought I would try again. I have been writing a third party piece of software, which uses cfront.ocx (ActiveX) in Microsoft Visual C++ to connect. All was going fine until we decided to upgrade our database to Microsoft SQL 2000. Now I cannot work out how to connect to the database. Has anybody got an example of using the ActiveX control to do this, if at all it is possible? Mark Saunders IT Manager Lexon UK Limited

Mark, - Have you got a test environement where you can test your 3rd party C/FRONT module in your previous database version (was it Navision NATIVE or SQL 7.0 ?) If it does works then try adding some debugging code in your C++ code which is going to write into a log file in which procedure/state the program is (ie : Connect Procedure, OpeningTable, AssignField,etc,etc…) That should give you a fairly good pointer in where your prog. is hanging/stopping. Check in the CFRONT manual a method called RELEASEALLOBJECTS I think, a few years back I’ve had experience funny problems and RELEASEALLOBJECTS seems to have cure them all … Good Luck! ###### tarek_demiati@ureach.com

The problem isn’t that it hangs. It all works fine with the Navision Proprietary Database. I use ConnectServer, OpenDatabase and the Login methods to make a connection. But to use an SQL database, it states you need to use ConnectServerandOpenDatabase, which doesn’t seem to exist in the OCX. Mark Saunders IT Manager Lexon UK Limited

Just installede COCX for 2.60F. I have no problem seeing the ConnectServerAndOpenDatabase method. Don’t have an SQL server to test it with, but can see it allright. Regards

Wonder if its something they added in 2.60f as we are running 2.60e, or if its something that I’m doing wrong :frowning: Doesn’t matter which at th moment I can’t do anything for the next week as I’m now in Greece on holiday :slight_smile: But if someone still wants to help me out on thins matter I will read this again when I get back to the UK Mark Saunders IT Manager Lexon UK Limited

You must specify connection method while connecting: “NDBCN” for native database or “NDBCS” for SQL-based. CF.ConnectToServerAndOpenDatabase(‘NDBCS’, ‘SERVER_NAME’, ‘TCP’,…); See page 10 of CFRONT manual (PDF). Business Applications Programmer Sertified Navision Developer SIA “Sintegra” Latvia