Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Simple C++ access DB thru SDK can't find Advantage Local Server Table


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Jul 23, 2017 12:49 PM Last Post By: charles leggette Threads: [ Previous | Next ]
charles leggette

Posts: 45
Registered: 7/17/00
Simple C++ access DB thru SDK can't find Advantage Local Server Table  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 23, 2017 11:09 AM
First Tokyo 10.2 program -- using Advantage 10,10 SDK --connection works find but when attempting a table open -- Advantage says error 7041 "cannot find table"..even though its a bound .ADT table owned by the ADD -- no other users on machine.here's code.

Here is .add connection string to local C:\dai\plx_data\planfaxsystem.add

rc = AdsConnect60((unsigned char*)m_strConnect, ADS_LOCAL_SERVER, (unsigned char*)"guest", (unsigned char*)"4417", ADS_TCP_IP_CONNECTION | ADS_COMPRESS_NEVER | ADS_IGNORERIGHTS , &m_connection);

//rc returns SUCCESS.pAdxDb.m_connection is m_connection.

followed by attempt to connect o a local table that's a bound non-free ADT table owned by Planfaxsystem.add

rc = AdsOpenTable(pAdxDb.m_connection, (unsigned char*) "system_runtimeparameters", NULL, ADS_ADT, ADS_ANSI, ADS_PROPRIETARY_LOCKING, ADS_IGNORERIGHTS, ADS_SHARED, &hTable);//ADS_CHECKRIGHTS,

Error returned is a 7041 -- can't find file....file is there as evidenced by using DataArch to open and access same.

No other users present.

Any ideas?
Antonio Estevez

Posts: 665
Registered: 4/12/00
Re: Simple C++ access DB thru SDK can't find Advantage Local Server Table  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 23, 2017 11:32 AM   in response to: charles leggette in response to: charles leggette
El 23/07/2017 a las 20:09, charles leggette escribió:
First Tokyo 10.2 program -- using Advantage 10,10 SDK --connection works find but when attempting a table open -- Advantage says error 7041 "cannot find table"..even though its a bound .ADT table owned by the ADD -- no other users on machine.here's code.

Here is .add connection string to local C:\dai\plx_data\planfaxsystem.add

Please, show the code where you assign the file path to the m_strConnect variable

charles leggette

Posts: 45
Registered: 7/17/00
Re: Simple C++ access DB thru SDK can't find Advantage Local Server Table  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 23, 2017 12:49 PM   in response to: charles leggette in response to: charles leggette
Pln.server = "C:
DAI
PLX_DATA
PLANFAXSYSTEM.add";

Pln.connectSys(Pln.server); //void PlanClass::connectSys(const CString activeSystemPathName)

which contains->(!sDb.connectToDatabase(activeSystemPathName))

which is here

bool AdxDb::connectToDatabase(const CString fullPathToDbOnServer, const CString serverName, const bool isUseServerSide)
{
m_strConnect = fullPathToDbOnServer;

charles leggette wrote:
First Tokyo 10.2 program -- using Advantage 10,10 SDK --connection works find but when attempting a table open -- Advantage says error 7041 "cannot find table"..even though its a bound .ADT table owned by the ADD -- no other users on machine.here's code.

Here is .add connection string to local C:\dai\plx_data\planfaxsystem.add

rc = AdsConnect60((unsigned char*)m_strConnect, ADS_LOCAL_SERVER, (unsigned char*)"guest", (unsigned char*)"4417", ADS_TCP_IP_CONNECTION | ADS_COMPRESS_NEVER | ADS_IGNORERIGHTS , &m_connection);

//rc returns SUCCESS.pAdxDb.m_connection is m_connection.

followed by attempt to connect o a local table that's a bound non-free ADT table owned by Planfaxsystem.add

rc = AdsOpenTable(pAdxDb.m_connection, (unsigned char*) "system_runtimeparameters", NULL, ADS_ADT, ADS_ANSI, ADS_PROPRIETARY_LOCKING, ADS_IGNORERIGHTS, ADS_SHARED, &hTable);//ADS_CHECKRIGHTS,

Error returned is a 7041 -- can't find file....file is there as evidenced by using DataArch to open and access same.

No other users present.

Any ideas?
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02