Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Moved database and VB6 can't connect anymore

Posted on by 1,275

I moved our Dynamics 9 system from one server to another (Both running SQL Server 2000). For the most part, all is working in Dynamics. However, when our payroll person tries to print the check register, she gets an error message:

A get/change operation on table 'UPR_WORK_HDR' failed accessing SQL data.

In addition, I have some reports in a VB6 system that need to access the Dynamics SQL database. It worked before the move. Yes, I have modified the OLEDB configuration. Dynamics would not run until I did. If I run the report from within Crystal Reports 9 and put in the log on (sa & password), the report runs fine. I just can't seem to invoke it from within the VB6 app. Now, following the report is some code that updates an Excel spreadsheet. It also needs to connect to the database. The open database code runs before the report prints. Since the database won't open for the report there is no reason to believe it will open for the Excel update. This is the database open code. It is exactly the same (with different db names) as the other database open bits. They work.

Set CnxnDynamics = New ADODB.Connection
CnxnDynamics.Provider = "SQLOLEDB"
CnxnDynamics.Properties("Data Source").Value = "Dynamics"
CnxnDynamics.Properties("Initial Catalog").Value = "TG1"
CnxnDynamics.Properties("Integrated Security").Value = "SSPI"
CnxnDynamics.Open

The error I get is: An Error occurred: [-2147467259] [DBNETLIB][ConnectionOpen(Connect()).] SQL Server does not exist or access denied.

 

Any ideas?

*This post is locked for comments

  • John Lowther Profile Picture
    John Lowther 5,122 on at
    Re: Moved database and VB6 can't connect anymore

    Just a quick thought.

    As I understand it, in payroll the Check Register report for paper checks, the Check Register report for direct deposit, and the Reprint Check Register report are actually three different reports. I know sounds silly but I discovered that with all the payroll updates. And speaking of payroll updates which if any payroll updates have you installed?

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    Re: Moved database and VB6 can't connect anymore

    If you check the 'More Info' button what does it tell you? Can this process be run as 'sa'. Can you run SQL Profiler while attempting this transaaction and capture the error?

  • pasvorto Profile Picture
    pasvorto 1,275 on at
    Re: Moved database and VB6 can't connect anymore

    OK, things are moving along. I got everyone upgraded to GP10 and things appear to be running smoothly. I got the macros recreated and necessary report changes made; with one exception. She is still getting this same error (A get/change operation on table 'UPR_WORK_HDR' failed accessing SQL data.) when she runs the check register during PR posting. If she does a reprint, she gets no error. New version, same error. Bummer.

  • pasvorto Profile Picture
    pasvorto 1,275 on at
    Re: Moved database and VB6 can't connect anymore

    Of course, this only resolves the report issue. The check register is still another issue.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Moved database and VB6 can't connect anymore

    Awesome, that was the next step, to determine if you for some reason had a hardcoded connection/password

  • pasvorto Profile Picture
    pasvorto 1,275 on at
    Re: Moved database and VB6 can't connect anymore

    Big change! I got it to connect fro my report by using:

    Set CnxnDynamics = New ADODB.Connection

    CnxnDynamics.Open "provider=SQLOLEDB; server=DYNAMICS2;database=DYNAMICS;user id=sa; password=password"

    In order to get the next bit of code working (update a spreadsheet), I need to disconnect and reconnect using TG1 (for database) rather than DYNAMICS.

    I think I am past this hump, I hope. I want to thank everyone who has contributed. You folks are GREAT!

  • pasvorto Profile Picture
    pasvorto 1,275 on at
    Re: Moved database and VB6 can't connect anymore

    80

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    Re: Moved database and VB6 can't connect anymore

    If you go into SQL and under File->Options of your databases, what is listed as the Compatibility Level?

  • pasvorto Profile Picture
    pasvorto 1,275 on at
    Re: Moved database and VB6 can't connect anymore

    i find it strange that one server has it in the registry and one does not.

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    Re: Moved database and VB6 can't connect anymore

    80 is the compatiblity level of SQL. In this case 80 is for SQL Server 2000, 90 is for SQL Server 2005.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans