Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8517327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:40:03+00:00 2026-06-11T05:40:03+00:00

I have to do some maintenance on a software that was delivered to a

  • 0

I have to do some maintenance on a software that was delivered to a customer.
This software is using database and in order to do some debugging session on my computer, I had to install SQL server 2008 R2 and the two database (MyData and MyRecord) that are used by this software.
I had some troubles doing the setting (login, mapping of the database to sa user) but I managed to go over those issues.
Now I am trying to run the software but it crashes during initialization when it tries to open a recordset.

At first I do the following to connect to the database :

::CoInitialize(NULL);
try   
{   
    HRESULT hr = pConnection.CreateInstance("ADODB.Connection");   
    if (SUCCEEDED(hr))   
    {   
        pConnection->ConnectionTimeout = 0;   
        CString strConnect;
        strConnect.Format(_T("Data Source=MyRecord;uid=sa;pwd=sa123456;"));
        hr = pConnection->Open((_bstr_t)strConnect,"","", -1);
    }   
}

with pConnection defined as :

_ConnectionPtr pConnection;

After that, I am trying to read some data from the database “MyRecord” with the following code :

CString sqlQuery = _T("select * from 通道1设置参数表");
try
{
    pRecordset.CreateInstance(_uuidof(Recordset));
    pRecordset->Open(_bstr_t(sqlQuery ),pConnection.GetInterfacePtr(),adOpenDynamic,adLockOptimistic,adCmdText);
} 
catch(_com_error   *e)  
{  
    AfxMessageBox(e->Description());   
}  

with pRecordSet defined as :

_RecordsetPtr pRecordset;

When the line “pRecordset->Open(…)” is run, the software crashes in the function Recordset15::Open(…) of the msado15.tli file.
In this Recordset15::Open function, the raw_Open(…) function returns DB_E_NOTABLE.
However, I am sure that the table dbo.通道1设置参数表 exists in MyRecord database.

The error is :

ERROR MESSAGE

I don’t know if the problem lies in the SQL server configuration or in the code.
This code works perfectly well on the customer’s PC so I would go with a configuration problem.
Thanks in advance !!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T05:40:05+00:00Added an answer on June 11, 2026 at 5:40 am

    In the ODBC connector for this database, the setting “Change the default database to” was not set to the MyRecord database.
    I have ticked the check-box, selected the database and now it is working correctly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am doing some maintenance on software and have a problem that I do
I have a php that makes some maintenance operations in my web and I
I am doing some maintenance on a database for an application that uses the
Hi I have some cron jobs that to routine maintenance tasks, I was wondering
Let's say you have several maintenance branches for existing releases of your software. Some
I have to do some maintenance on a WCF service that is hosted in
I have to do some maintenance on legacy code that uses Hungarian notation (and
I have some custom programs I've written to do various maintenance/monitoring tasks that I
I'm doing some maintenance work on a database application and I've discovered that, joy
I have a C# Application that does some maintenance tasks. It needs to run

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.