Member Login

Username
Password
Forget Password
New Sign Up
  Search Forums

  FREE Support
  Forums

  QODBC v10
  QODBC v9
  QODBC v8
  QODBC v7
  QODBC v6

  QODBC FAQs

The QDeveloper Forum is the property of Data Access Worldwide, Australia. The contents of this forum have been taken by FLEXquarters.com Limited, Hong Kong at: http://support.flexquarters
.com/esupport/
without our permission.

 


 
If you can't
login and post questions or you are having trouble viewing forum posts:
Click Here
 
 
 
 

Forum : Querying Multiple Company FilesSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v9 Independent Self Help Forum

 New Topic 
 
 Post Reply 
[1]  
 Querying Multiple Company Files 
 Author   Message 
  bdenison 
  
 Group: Members 
 Posts: 1 
 Joined: 2009-02-10 
 Profile
 Posted : 2009-02-12 12:58:21
I am trying to create an application that will query different company database files, about 20, to get various information from each company. I know I can create a DSNless connection and change the company settings as I go through the company list, but is there a way to open several company files at once, or at least query each company while people are in them without prodcuing any locking (e.g. exiting companies requires additional apps to be logged out, prompting for access by application). 

  Top 
  Tom Aczel 
  dd4bf_dawworld.jpg
 Group: Administrator 
 Posts: 6281 
 Joined: 2006-02-17 
 Profile
 Posted : 2009-02-12 16:28:36
Sorry, it's QuickBooks that can only have one company file open at the one time on the one computer. You have to open and close each connection to each company file one by one. 

  Top 
  SWT 
  
 Group: Members 
 Posts: 22 
 Joined: 2006-11-09 
 Profile
 Posted : 2009-10-03 02:35:42

I have an access database that gathers information from 23 different QB company files.  I needed to do two things in order accomplish this:

1. use passthrough queries

2. use the "runapp" function in Access macros.  The app the runapp will point to is a .bat file you create on your hardrive.  Put this text in the .bat file "taskkill /F /IM QBW32.exe /FI "USERNAME eq [enter your windows user name here]".  so for example my user name is strewartha so my .bat file contains this text - taskkill /F /IM QBW32.exe /FI "USERNAME eq strewartha"

This way, the .bat file is ran each time between companies so that the QB executable is reset each time.

Note:  the command line on my runapp is c:\sean.bat and inside my sean.bat file i have this text == taskkill /F /IM QBW32.exe /FI "USERNAME eq strewartha

 

  Top 
  Jim K 
  
 Group: Members 
 Posts: 22 
 Joined: 2006-04-19 
 Profile
 Posted : 2010-05-20 16:14:32
Is there a way to setup queries using MS Query that will query different datafiles one at the time by using the refresh method? What I'm asking is can you setup a connection string that tells QODBC to connect to a specific data file and return data from that file, or would you need to use VBA for that? 

  Top 
  Tom Aczel 
  dd4bf_dawworld.jpg
 Group: Administrator 
 Posts: 6281 
 Joined: 2006-02-17 
 Profile
 Posted : 2010-05-20 17:02:36

As far as MS Query is concerned, you just need to setup a different DSN for each company file and simply close the connection and open another DSN when you want to query that company file.

See: How do I create or configure a QODBC DSN? for further information.

 

  Top 
  Jim K 
  
 Group: Members 
 Posts: 22 
 Joined: 2006-04-19 
 Profile
 Posted : 2010-05-20 22:50:58
Hi Tom, I've come across a weird phenomenon. I have setup the various DSN's with all companies giving access to QODBC for automatic logon even when QuickBooks is not running. I've tested all queries while QB is running and they work OK. When I then go to my Excel workbook and do a refresh on those queries, one at the time, QODBC reports that the specified user is not allowed to logon automatically. 

  Top 
  Jim K 
  
 Group: Members 
 Posts: 22 
 Joined: 2006-04-19 
 Profile
 Posted : 2010-05-21 11:55:32
When switching datafiles, this is what I get (Further to my post from yesterday)


When I then check in QuickBooks, I see
 

  Top 
  Tom Aczel 
  dd4bf_dawworld.jpg
 Group: Administrator 
 Posts: 6281 
 Joined: 2006-02-17 
 Profile
 Posted : 2010-05-22 22:12:02
Try closing the Excel Workbook and then open it using another DSN. 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to    

Copyright (c) 2006-2009
Data Access Worldwide, Australia. This FREE self help forum website was copied by FLEXquarters.com Limited, Hong Kong to: http://archive.qodbc.com
/forum50f5.html
without our permission.

The QDeveloper Forum is dedicated to the FREE professional exchange of information. QODBC and FlexODBC users can post support queries, report product bugs, or simply search topics for help. Data Access Worldwide - Asia Pacific normal office business hours are 9am to 5pm week days Australian EST with the exception of Public Holidays.
       
ABN: 86 544 223 459
PO Box 873, Boronia VIC 3155 Australia  Tel: 03 9761 3644  Intl: +613 9761 3644