Welcome, Guest. Please Login.
04/29/24 at 19:49:30
News:
Home Help Search Login


Pages: 1 2 
Send Topic Print
ODBC connection failed on client (Read 5492 times)
davson
Browser
*


I love YaBB 1G -
SP1!

Posts: 35
ODBC connection failed on client
09/16/04 at 08:32:39
 
My client fails to connect to the Pervasive Server engine when an attempt is made to open a combo box on an Access form.
 
Background:
 
Server: Pervasive ODBC server setup, DBA, Access Project which has linked tables to DBA
Client: Access installed, Pervasive ODBC Client setup.
 
The client goes across the network to open the Access Project which is saved on the server, this is successful, but when a combo box of customer information is selected on a form then this message appears:
“ODBC – connection to ‘(company)DB failed.”
 
Also the client fails to open the shortcut I have created on the server to the Access Project with this message:
 
“Microsoft Access can’t find the shortcut database ‘C:\DBAMFG\Access Reports\Sales Order Project.mdb’.  Re-create the shortcut with the correct location of the database.”
 
When I test the client connection within ODBC Admin the connection is successful.
 
I setup the server & client ODBC DSN following the instructions on the DBA ODBC Connectivity Center.
 
Has anyone had this problem before?
Back to top
 
 
  IP Logged
aricon
Active Member
*****


Systems
Consulting-See
website for
products!

Posts: 1283
Gender: male
Re: ODBC connection failed on client
Reply #1 - 09/16/04 at 10:07:16
 

Also the client fails to open the shortcut I have created on the server to the Access Project with this message:
 
“Microsoft Access can’t find the shortcut database ‘C:\DBAMFG\Access Reports\Sales Order Project.mdb’.  Re-create the shortcut with the correct location of the database.”
 
HUH? How is it that you figured you could open a shortcut remotely???
Back to top
 
 

Sincerely,

Lorne Rogers
President
Aria Consulting & Implementers Ltd.
Phone: (780) 471-1430
Fax: (780) 471-4918
E-mail: lrogers@ariaconsulting.net
Email WWW   IP Logged
Kelloggs
Active Member
*****


Do crazy people know
they are crazy?

Posts: 785
Gender: male
Re: ODBC connection failed on client
Reply #2 - 09/16/04 at 10:18:50
 
The problem is not ODBC. It's the combo box's query.  
 
As an alternative, you can use an 'On Open Event' on the form or 'On Got Focus Event' on the Combo Box to create a temporary table.
 
ciao,
 
Kelloggs
 
Back to top
 
 

Evo ERP - 35 Users
Dumped MS Access like a hot potato (VB.Net rules!!!)
Email WWW   IP Logged
davson
Browser
*


I love YaBB 1G -
SP1!

Posts: 35
Re: ODBC connection failed on client
Reply #3 - 09/16/04 at 11:58:01
 
Thanks for your comments.
 
Lorne-OK I didn't know that wasn't possible, silly me!
Do you know how to set up client access directly to a form within an Access project, so it opens automatically without clients having to physically open Access and select the project across the network? Cause I don't want any changes to be accidentally made to the design of the project. Also it looks professional with the main form opening first and the client not having to do anything but double click on an icon.
 
Kelloggs- I'm not too familiar with 'On Open Event' or 'On Got Focus Event'. Is it fairly simple to create a list of customers & SO n.o from linked tables for users to select to be displayed in a report.
Thanks
Back to top
 
 
  IP Logged
aricon
Active Member
*****


Systems
Consulting-See
website for
products!

Posts: 1283
Gender: male
Re: ODBC connection failed on client
Reply #4 - 09/16/04 at 12:09:09
 
Kelloggs is atlking about using some VBA code.
 
As to how to give users direct access to the form: there are a couple of options. Both a QUITE involved. If you like you can email me direct and I can give you some high-level guidance.
Back to top
 
 

Sincerely,

Lorne Rogers
President
Aria Consulting & Implementers Ltd.
Phone: (780) 471-1430
Fax: (780) 471-4918
E-mail: lrogers@ariaconsulting.net
Email WWW   IP Logged
Kelloggs
Active Member
*****


Do crazy people know
they are crazy?

Posts: 785
Gender: male
Re: ODBC connection failed on client
Reply #5 - 09/16/04 at 13:32:06
 
It's not VBA.
 
Create a Macro: MyMacro
SetWarnings          Warnings On:      No
OpenQuery          Query Name:      myquery
SetWarnings          Warnings On:      Yes
 
Create a New Query: myquery
SELECT BKARINV.BKAR_INV_NUM, BKARINV.BKAR_INV_SONUM, BKARINV.BKAR_INV_CUSCOD, BKARINV.BKAR_INV_CUSNME INTO TMP_MyFormMyCombo
FROM BKARINV;
 
Open your form on design mode click on properties select
On Open Event select the macro you just created it
 
select your ComboBox
click on Properties
Select Data
Select Row Source and type in TMP_MyFormMyCombo
 
Ready!
 
This is just a guide. Modify the query and objects names as fit and need it.
 
Kelloggs
 
PD: why are you using Access Project?? isnt it only use to connect to MS SQL?
 
ciao
 
Back to top
 
 

Evo ERP - 35 Users
Dumped MS Access like a hot potato (VB.Net rules!!!)
Email WWW   IP Logged
aricon
Active Member
*****


Systems
Consulting-See
website for
products!

Posts: 1283
Gender: male
Re: ODBC connection failed on client
Reply #6 - 09/16/04 at 14:24:31
 
Kelloggs,
 
Sorry about that. You're right. It's in the properties of the combo box for the query.
 
And GOOD QUESTION about the Access Project!! I hadn't even caught that. I just saw Access and assumed that davson was using a regular Access DB. I didn't think that an Access 2003 project would even connect to Pervasive.....but apparently it worked....how about that..... Shocked
Back to top
 
 

Sincerely,

Lorne Rogers
President
Aria Consulting & Implementers Ltd.
Phone: (780) 471-1430
Fax: (780) 471-4918
E-mail: lrogers@ariaconsulting.net
Email WWW   IP Logged
davson
Browser
*


I love YaBB 1G -
SP1!

Posts: 35
Re: ODBC connection failed on client
Reply #7 - 09/16/04 at 17:19:06
 
Thanks Kelloggs I will give those steps a try tomorrow. OK so I'm confused about the difference between an Access Project and Access DB. How can I tell which I have created? Could this be the reason why I get an ODBC connection error?
I still get an ODBC connection failed message even with only a text box on my form. I have  set it up so when a SO N.o is entered into the text box a marco runs and finds the relevant record to display in a report, but that doesn't even work with the client.
Back to top
 
 
  IP Logged
aricon
Active Member
*****


Systems
Consulting-See
website for
products!

Posts: 1283
Gender: male
Re: ODBC connection failed on client
Reply #8 - 09/16/04 at 20:21:22
 
An Access project is called a project because it contains only code-based or HTML-based database objects: forms, reports, the name and location of data access pages, macros, and modules. These are the database objects that you use to create an application. Unlike a Microsoft Access database (database: A collection of data related to a particular subject or purpose. Within a database, information about a particular entity, such as an employee or order, is categorized into tables, records, and fields.), an Access project does not contain any data or data definition based objects: tables (table: A database object that stores data in records (rows) and fields (columns). The data is usually about a particular category of things, such as employees or orders.), views (view (object): In an Access project, a type of query that is a virtual table based on an SQL SELECT statement. For example, a view might contain only 3 out of 10 available columns in a join of two tables, in order to limit access to certain data.), database diagrams (database diagram: A graphical representation of any portion of a database schema. It can be either a whole or partial picture of the structure of the database. It includes tables, the columns they contain, and the relationships between the tables.), stored procedures (stored procedure: A precompiled collection of SQL statements and optional control-of-flow statements that is stored under a name and processed as a unit. The collection is stored in an SQL database and can be run with one call from an application.), or user-defined functions (user-defined function: A query that takes input parameters and returns a result like a stored procedure. Types: scalar (multistatement; returns one value), inline (one statement; an updateable table value), and table (multistatement; table value).). Instead, these database objects are stored in the SQL Server database.
 
You can tell the difference by looking at the extension on the file you created. A Project has an .ADP extension and an Access database has an .MDB extension.
Back to top
 
 

Sincerely,

Lorne Rogers
President
Aria Consulting & Implementers Ltd.
Phone: (780) 471-1430
Fax: (780) 471-4918
E-mail: lrogers@ariaconsulting.net
Email WWW   IP Logged
davson
Browser
*


I love YaBB 1G -
SP1!

Posts: 35
Re: ODBC connection failed on client
Reply #9 - 09/17/04 at 02:40:28
 
Wow great explanation and I have created a Access DB. Thanks.
Back to top
 
 
  IP Logged
davson
Browser
*


I love YaBB 1G -
SP1!

Posts: 35
Re: ODBC connection failed on client
Reply #10 - 09/17/04 at 06:48:48
 
Kelloggs-I have hit a few problems trying to follow your steps. Hope you can help. Thanks.
 
On the query this part of the SQL statement 'TMP_MyFormMyCombo' - should there be a '.' between form&combo?
On the form properties I don't see 'Open Event' which tab is this? Is is 'Event' and if so then which section do I add the marco to?
On the combobox 'Data\Row Source' properties Access doesn't like 'TMP_MyformMycombo' should there be a '.' between it?
 
Thanks
Back to top
 
 
  IP Logged
Kelloggs
Active Member
*****


Do crazy people know
they are crazy?

Posts: 785
Gender: male
Re: ODBC connection failed on client
Reply #11 - 09/17/04 at 11:07:14
 
On the query this part of the SQL statement 'TMP_MyFormMyCombo' - should there be a '.' between form&combo?
 
No
 
the query should read:
 
SELECT  
BKARINV.BKAR_INV_NUM,  
BKARINV.BKAR_INV_SONUM,  
BKARINV.BKAR_INV_CUSCOD,  
BKARINV.BKAR_INV_CUSNME  
INTO  
TMP_MyFormMyCombo
FROM  
BKARINV
ORDER BY BKARINV.BKAR_INV_INVDTE DESC;
 
I add Order by date desc  
 
1.- open db on design mode
2.- open form on design mode
3.- click properties
4.- select Event tab
5.- find "On Open" field
6.- type in/select your macro
 
You must run the query and create the table before you modify the row source on the combo box
 
 
ciao
 
Kelloggs
Back to top
 
 

Evo ERP - 35 Users
Dumped MS Access like a hot potato (VB.Net rules!!!)
Email WWW   IP Logged
davson
Browser
*


I love YaBB 1G -
SP1!

Posts: 35
Re: ODBC connection failed on client
Reply #12 - 09/17/04 at 15:21:18
 
Thanks Kelloggs. Well I eventually managed to get that set-up on the server and the combo box gets the infomation from the temp table. Tomorrow I will be able to check out if the ODBC error message disappears on the client. Finger crossed.
Back to top
 
 
  IP Logged
davson
Browser
*


I love YaBB 1G -
SP1!

Posts: 35
Re: ODBC connection failed on client
Reply #13 - 09/21/04 at 12:00:53
 
So I gave it a go and I'm still getting the same errors, which makes me think that I haven't set the client up correctly.  
Can someone outline basic steps on how the client actually gets remote access to the server DB? Because I have installed the Pervasive Client which is looking at the server and still get the ODBC connectivity error when I attempt to open a form from the remote Access DB. Do I need to set something else up on the client machine before the form will open without error.
Thanks.
Back to top
 
 
  IP Logged
Kelloggs
Active Member
*****


Do crazy people know
they are crazy?

Posts: 785
Gender: male
Re: ODBC connection failed on client
Reply #14 - 09/21/04 at 12:43:26
 
There is something that isnt clear to me.
 
You have created a MS Access Application.  
You have divided it into back-end database (Server DB) and front-end database (Client DB)
 
The back-end database (Server DB) has all the linked tables, queries, forms??
And the front-end database (Client DB) has what??
 
You cannt have a Client DB that links to a link
 
The Server DB should have all the tables (Not Linked Tables)
And the Client DB should have all the forms, queries, modules, and reports.
 
Kelloggs,
Back to top
 
 

Evo ERP - 35 Users
Dumped MS Access like a hot potato (VB.Net rules!!!)
Email WWW   IP Logged
Pages: 1 2 
Send Topic Print