f



MS Access 2002 problem: linked form fields in ODBC queries

Ok, my problem is the following:

I have very complicated Access 97 databases that link through ODBC to
Sybase databases.

Now in some of the forms controls I had queries that used as "where
clause" parameters form field values; For example:

     select foo from bar where a_colmun = [forms]![MyForm]![MyField]

This worked in Access 97 but fails in Access 2002 (ODBC failure) when
the table *bar* is an ODBC Sybase (in my case) linked table.

If *bar* were a local Access table, the query would do fine.

if i did

      select foo from bar where a_colmun = (select
[forms]![MyForm]![MyField] from dual)

where *dual* is a table with only one line of data. That works, but it
slows my queries.

Someone have a solution ? (i cannot upgrade to newer versions of
Access)

Thanx in advance

0
1/9/2006 1:07:29 PM
comp.databases.ms-access 42670 articles. 0 followers. Post Follow

2 Replies
518 Views

Similar Articles

[PageSpeed] 38

Per monnomiznogoud@yahoo.com.ar:
>Now in some of the forms controls I had queries that used as "where
>clause" parameters form field values; For example:
>
>     select foo from bar where a_colmun = [forms]![MyForm]![MyField]
>
>This worked in Access 97 but fails in Access 2002 (ODBC failure) when
>the table *bar* is an ODBC Sybase (in my case) linked table.
>
>If *bar* were a local Access table, the query would do fine.

Is the SQL in the form's .RecordSource or are you applying it from VBA code?

If it's in .RecordSource, you can probably stop here and move on the next
post...



I've had slightly similar problems when VBS uses a query that refers to a form's
control value.   Query works find when invokes by double clicking the query
object, but can't find the referenced control when invoked from VBA.

Workaround for me was to define a parameter in the query and explicitly load it
in VBA before opening an RS.
-- 
PeteCresswell
0
PeteCresswell
1/9/2006 2:40:45 PM
PeteCresswell

>Is the SQL in the form's .RecordSource or are you applying it from VBA code?

It is in the a list's record source in fact.

The IT services suggested to put back the Access 97 Sybase's patch :)

The only solution i found is the one i posted above, an innner select
using the form's field value with a local table (dual, a one-line
oracle-like table i defined)

0
1/10/2006 9:37:35 AM
Reply:

Similar Artilces:

accessing MS Access database fila via ODBC problem
Hi! I'm trying to connect to a MDB file via ODBC like this: char *DSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\dev-cpp\\test\\1.mdb"; SQLAllocEnv(&env); SQLAllocConnect(env, &hdbc); SQLBrowseConnect(hdbc, (UCHAR*)DSN, strlen(DSN), (UCHAR*)buf, BUF_SIZE, (SQLSMALLINT*)&rcvlen); The function SQLBrowseConnect fails and SQLGetDiagRec returns "IM001 Driver does not support this function" Can anyone help me? Thanks! David On S...

Create MS/ACCESS database app for non-ms/access users
Is it possible to create an MS/ACCESS database application and package it for users who do not have MS/ACCESS loaded in their PCs? I was told that this is possible, but I don't know what software is needed. Do you know? If so, please answer this post. Thanks. SueB *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! Per Sue Bricker: >Is it possible to create an MS/ACCESS database application and package >it for users who do not have MS/ACCESS loaded in their PCs? > >I was told that this is possible, but...

Use ASP to read MS Access query that calls MS Access function
Hi: I have an MS Access query for a table called MyTable. One of my fields in the query is a custom field that looks like "MyField: = MyFunction(ID)" where ID is a field in MyTable. I have ASP code and I can use it to read the query OK when "MyField" is not part of the query. If I add in MyField and then run my ASP code to try to read all the query fields, I get an error message on my web browser which says something to the effect of "cannot find MyFunction." On the Access side, I have MyFunction set up in a module and use the keyword "Public" in front of the function name. What else do I need to do to get my ASP code to run this query. I'm trying to avoid reproducing MyFunction within the ASP code if possible. Thanks. Kevin On Thu, 14 Jun 2007 21:38:19 -0000, k-man <kmccrack@gmail.com> wrote: Sorry, no can do. From ASP you don't have access to the Access VBA interpreter. -Tom. >Hi: > >I have an MS Access query for a table called MyTable. One of my >fields in the query is a custom field that looks like "MyField: = >MyFunction(ID)" where ID is a field in MyTable. > >I have ASP code and I can use it to read the query OK when "MyField" >is not part of the query. If I add in MyField and then run my ASP >code to try to read all the query fields, I get an error message on my >web browser which says something to the effect of "cannot find >MyFunction."...

accessing ms access via ODBC without Microsoft Access
Hi, If I have a computer without Microsoft Access installed but with an ODBC connection to a .mdb file - can I still access the 'database' via ODBC? thanks Tim <timasmith@hotmail.com> wrote in message news:1145206985.433826.106120@i40g2000cwc.googlegroups.com... > Hi, > > If I have a computer without Microsoft Access installed but with an > ODBC connection to a .mdb file - can I still access the 'database' via > ODBC? Yes, provided you are running a program prepared in a language that supports ODBC and have installed an ODBC driver on that user's machine. What you cannot do is to access a Jet (often called Access) database via ODBC from Access. You can link to tables in that Jet database, or open it directly, but you can't ODBC to Jet tables from Access itself. Larry Linson Microsoft Access MVP ...

Possible to keep MS Access interface and migrate the MS Access to MS SQL Server?
Hello all Would it be possible to migrate the MS Access 2000 to MS SQL Server 2000? My application is using MS Access 2000 as database and as user interface such as forms. Now, I want to migrate the backend database from MS Access 2000 to MS SQL Server 2000. However, I want to keep the MS Access 2000 interface. Would it be possible? If I migrate the MS Access to SQL Server, would the queries, back-end VBA, macro, tables and forms be affected? Do I need to change the MS Access data type to SQL server supported data type? Which tool I can use to do the migration? Upsizing wizard or exporting...

How to link fields in MS word document to Access database
Anyone have experience in linking fields in an MS Word document to an access database? What I am considering doing is taking an existing fill-in-the fields word document, for which I cannot now save the data, and allow it to be opened with no data, have the fields filled in and then save the data in an Access database. I also want to later select the document (from a file in the database), open the word document and populate the fields from the database. Of course if there are then any updates I want to put them back into the database. Workable? Anyone with sample code? Bob Alston On Jun 10, 6:21=A0pm, Bob Alston <bobalst...@yahoo.com> wrote: > Anyone have experience in linking fields in an MS Word document to an > access database? Hello Bob, Instead of Word documents I use RTF-documents. RTF-documents act just like Word documents in Word. The difference is that RFT-documents are plain text-files, and can easily be processed in Access to find - with the appropriate placeholders - the filled in information. HBInc. > > What I am considering doing is taking an existing fill-in-the fields > word document, for which I cannot now save the data, and allow it to be > opened with no data, have the fields filled in and then save the data in > an Access database. =A0I also want to later select the document (from a > file in the database), open the word document and populate the fields > from the database. =A0Of course if there are then ...

MS-Access, ODBC access with Visual C++ 6.0, and external actions on database
[was redirected here] I have a problem that I can distill down to the following. 1/ A Visual C++ 6.0 program connects to a MS Access database using an ODBC connection and sleeps for a long time. The connection takes all defaults and uses CDatabase::useCursorLib in the OpenEx command. 2/ The database is well over 400MB large with over 200 tables and is compacted. 3/ Another process starts a winzip on that database that takes about 45 to 60 seconds to complete (wzzip -a -ex aaa.zip aaa.mdb). 4/ The Windows Task Manager shows 100s of MBs of available memory being consumed....

Problem with my chart in MS Access 2002 using a form and VB
Hi everyone, I am new to Access and Visual Basic so things my be getting across a bit cloudy. I only started using VB for one week. I am having a little problem with the database that I am working on. I am working with MS Access 2002. And I am having a problem with one of my charts. I will explain how everything is laid out then go into details. The chart was created into a report and it is getting its information from a query. Here is the flow of information: - Using a form I select a Start Date and an End Date. (these dates are to limit the query to the data needed) - When I click a co...

MS ACCESS 2002: How to DESIGN a semi-complex QUERY EXPRESSION FIELD???
Ok, my Access 2002 language writing skills are VERY rusty,. I would know how to do what I need using SQL Server's "Coalesce' function, but I don't have that available to me in the Access 2002 database I'm currently programming. ....So could someone advise me how to add an Expression Field to a Access 2002 Query that will reflect the following: Imagine I want a field that derives from Fields in a table I've called tblContacts. tblContacts has fields called FirstName, LastName and CompanyName. Here's what I want the Expression Field (which I'll call 'FullName') to reflect: 1) If neither FirstName nor LastName are NULL, then FullName should be the equivalent of LastName, FirstName (that's the LastName followed by a comma followed by the FirstName. 2) If LastName is NULL, but FirstName is not NULL, then FullName should be the equivalent of FirstName. 3) If both LastName and FirstName are NULL, and CompanyName is not null, then FullName should be the equivalent of CompanyName. So that's it. How would you 'design' this FullName field in Access' Query Design view? Thanks in advance. Alan Mailer <clarityassoc@earthlink.net> wrote in news:494hg29rd5hm6r61ljgv66hgea0egnn2tr@4ax.com: > Ok, my Access 2002 language writing skills are VERY rusty,. I > would know how to do what I need using SQL Server's "Coalesce' > function, but I don't have that available to me in the Access > ...

MS Access 2002
MS Access 2002 - query form control returns funny symbols like [][] I am running an append query on a form. Access is having trouble with the calculated fields and comboboxes. Example &#8211; referring to forms!FormName!ControlName within the query should return the value of that control, correct? I am receiving symbols such as boxes [] or [][] as well as Chinese symbols. Any thoughts as to why this is happening. thanks This happens if Access does not understand the data type of the calculated controls. Typecast the calculated fields, and set the Format of unbound controls. For ...

Access MS-ACCESS database on server from client????
I m currently developing a java based application and want to know how can i make client access database located on the server? "HeMan_Speaks" <Lunar20092010@gmail.com> wrote in message news:d71ce567-0434-48b8-b1d2-bb191706ab45@w8g2000prd.googlegroups.com... >I m currently developing a java based application and want to know how > can i make client access database located on the server? I think you're going to have to expand a little bit more in your question here, as is not 100% quite clear what you're trying to do. You might want to make a little bit of a distinction between MS access, the development system that allows you to write code, build forms, and build reports, and that of the database engine that you choose to use with MS access. When you build an application MS access, you then choose your database engine, that might be oracle, SQL server, or perhaps more often leave the default jet database. So when you say make a client access application, are you talking about a piece of software that you plan to install and each computer? The fact that your introducing the issue of java further complicates your question. Perhaps your question is simply you have some java code running on a server, and with to open a mdb file (an access database file). In this situation you're not really using MS access at all here (you using what is called the jet database engine to read that mdb file). For all the trouble in this type of sce...

request for explanation on access an database in ms access
This is the code that I found on the internet for accessing an ms access database: import java.sql.*; class Test { public static void main(String[] args) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); // set this to a MS Access DB you have on your machine String filename = "d:/java/mdbTEST.mdb"; String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ="; database+= filename.trim() + ";DriverID=22;READONLY=true}"; // add on to the end // now we can get the connection from the DriverManager Connection con = DriverManager.getConnection( database ,"",""); } catch (Exception e) { System.out.println("Error: " + e); } } } What I don't understand is the declaration of database. What I did was putting the database in the same dir as the sourcecode and use "jdbc:odbc:CafeJolt.mdb". But this doesn't work. And the above code does, why is that??? Actually it's not Java question. It's ODBC question. You have to have ODBC connection. Depending of Windows it's usually something like this (for my Windows 2000): Start->Sttings->Control Panel->Administartive Tools->Data Sources(ODBC)-> User DSN -> [Add]-> Driver to Microsoft Access(*.mdb) === And here, finally you can choose file name. ...

MATLAB command to access MS Access database
Hi! Is there a MATLAB command which gives access to a .mdb MS Access database or do I need a special driver? Thanks, Andree Hi Andree Ellert, you can use activeXcontrol to interact with MS-Access database. access = actxserver('Access.Application'); returns the handle for Access. set(access, 'Visible', 1); will show the opened Access window. use get(access) and set(access) commands to find the methods available to call. -Vadivelu M =========== http://www.mathworks.com/access/helpdesk/help/toolbox/database/datatool.shtml "Andree Ellert" <ellert@gmx.net/////\\\\\> wrote in message news:eed9874.-1@webx.raydaftYaTP... > Hi! > > Is there a MATLAB command which gives access to a .mdb MS Access > database or do I need a special driver? > > Thanks, > > Andree Andree Ellert wrote: > > > Hi! > > Is there a MATLAB command which gives access to a .mdb MS Access > database or do I need a special driver? > > Thanks, > > Andree <http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=4045&objectType=file> -Hardik ...

Read-Only ODBC Access to MS Access 2000
I have created an ODBC File DSN data source in Windows XP. I have successfully used this DSN to link tables from a Sybase SQL Anywhere database to Access 2000. How can you make this ODBC connection read-only? P.S. I would like to make the ODBC connection itself read-only (if possible) rather than adding security to the MS Access DB. ...

MS Access Database Query
Hi, first of all I have to say I'am new to MS Access, I'm used to database systems like Oracle or MySQL. I created a simple database consisting of a single table and a form to fill in new entrys and search for existing entrys. But the search function that Access generates as I created the proper button is way to simple, I need a function that enables to search in several columns. I saw a few quite simple examples where this was done by DAO, but this doesn't work with a .mdb database, does it? (Access allways replies 'Unknown user datatype' once it gets to the line: 'Dim...

Problem with MS Access Database
------=_NextPart_000_0038_01C56A17.539605A0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Hello, I'm using wxWidgets now a long time for designig my applications. This weekend I tried first to use the Database classes, but I've got a problem with them... I've got an Microsoft Access Datenbase, with two tables: Orte(ID, Staat, Name, and so on) PLZOrte(ID, PLZ) This tables are set into a relationship. The field ID ist the primary key in Orte and set up the relation. Now I'd like to do a query to this database in my...

MS Access Forms problem
Hi everyone! I have a forms problem. Bakground: I have created a number of tables. Of these, I have a main parent table (Personal Details) and a number of other child tables (Tax file No., VISA card no.), etc...... All tables have a primary key of "Name", all child tables forming foreign key references with the parent table 'Personal Details'. I have established referential integrity will all relationships. All relationships are 1-to-1. To solve my problem, I have tried making the relationships 1-to-many (ie., the 2nd option in the "Link Type" option of the Relat...

MS Access ODBC problem
I need to link some tables from a remote MySql server (ver. 4.1.12) to a MS Access 2003 db. I can succesfully connect using both MySql Administrator and MySql Query Browser. Even the ODBC Admin test button tells "Success; connection was made". But when I try to link the tables from within MS Access using the ODBC DSN I get: [MySQL][ODBC 3.51 Driver]Access denied for user 'xxx'@'%' to database 'yyy' (#1044) I searched the Net without results so far. Any help will be really appreciated. Thanks, Bruno On Wed, 23 Nov 2005 17:43:05 +0100, Bruno wrot...

Does MS Access db have problems with multiple users access it at once?
I am developing an Access db which will be used by multiple users. My questions are: Does MS Access have problems with multiple users accessing the db at once? If yes, what is your solution to this problem? I was informed that Access is not a good application for multiple users accessing it at once. Thank you for your assistance to this issue of mine. Will the users just be reading, or will multiple users be writing at the same time? I've seen data corruption in older (Access '97) databases with large numbers of users reading and writing. I haven't seen any corruption where...

Best way to access a remote MS ACCESS database
What is the best way, via the internet, to access a remote Microsoft Access database? I was thinking of using VPN, but I thought that I would check here to see if there is a better way. Any suggestions? Thanks Do you mean remotely controlling an Access database, or linking tables over the internet? The first is doable, the second is a recipe for disaster. Remote Control: If your remote OS is Windows XP, you can use Remote Desktop (although only 1 person can access the PC at a time; this will change in the upcoming Service Pack for XP, but that may not help you now). Otherwise, GoToMyPC offers similar services, as does Terminal Server (a component of a Windows Server machine), PCAnywhere, et al. Linking to remote tables: You will almost certainly encounter severe problems with corruption, and your performance will almost certainly be so poor as to be unworkable. I attempted this once, with a web server in Canada and my machine in Augusta, GA. Even tiny data requests on a very well optimized data structure took waaaay too long to process ... it's simply not workable, IMO. Other alternatives would be covert the app to a web-based and place your data on a web server. Access/Jet isn't really designed for those workloads, but running a small site with minimal transactions and users can be done. Otherwsie, consider switching to a more robust data platform like MySQL, SQL Server, etc. -- Scott McDaniel CS Computer Software Visual Bas...

Accessing MS ACCESS database using Data Environment
HI, I have developped a program in Visual Basic 6.0 using MS Access database. I have created all my reports through Data Environment where I have entered the location of my database file (for e.g c:\project\app\test.mdb) in the Connection properties. I have installed my application on another PC using Package & Deployment wizard. When viewing the reports on the other PC, I have to enter everytime the new location of the database. How can I solve this problem, please? nadia wrote: > HI, > I have developped a program in Visual Basic 6.0 using MS Access database. >...

Running a ms access database with access 2003 in Vista
I have a Database that I am trying to run on a new vista computer. Up to now I was running it on a win 98 computer and using access 2003! I installed access 2003 and I can make it run and view the data but I can not save any new records. Has any one seen this problem yet? Thanks Clarence Wollman On Wed, 22 Aug 2007 13:17:13 -0700, cwoll <clarencewollman@gmail.com> wrote: Do you have the same problem with the Northwind sample application? (search your computer for northwind.mdb) -Tom. >I have a Database that I am trying to run on a new vista computer. Up >to now I was running it on a win 98 computer and using access 2003! I >installed access 2003 and I can make it run and view the data but I >can not save any new records. >Has any one seen this problem yet? > >Thanks Clarence Wollman On Aug 22, 7:29 pm, Tom van Stiphout <no.spam.tom7...@cox.net> wrote: > On Wed, 22 Aug 2007 13:17:13 -0700, cwoll <clarencewoll...@gmail.com> > wrote: > > Do you have the same problem with the Northwind sample application? > (search your computer for northwind.mdb) I don't have a problem opening and editing the northwind.mdb. Thanks Hi I found a workaround. This database has a fronted and a backed. When I link them in the linked table manager, I was going threw the network to my computer. The reason I am doing this is when any networked computer opens the shortcut to the front end of this computer the linked table manger knows...

Accessing a MS Access database across two servers
Hi The technical support guys at my company have set up my system so that the server containing the MS Access database is on one server, while the pages that should access the database are on another server. When the pages and database are on the same server, I usually just connect through ODBC. The problem is that I don't know how to set up an ODBC connection to link from one server to a database in another. Anyone know what I am getting at and know of a possible solution, or a link to a site which may help. thanks in advance Brendan "Singularity" <Brendan.Collins@Sin...

MS Access: ODBC or NO ODBC
Hi, I have two MS Access 2000 databases on my desktop. I need the data from both. I use the following code to read a table from the first db: PROC IMPORT OUT=table1 DATATABLE ="table1" DBMS = ACCESS2000 REPLACE; DATABASE="C:\Documents and Settings\Desktop\db1.mdb"; RUN; This works fine. For my second database, using the same code but changing the file/table names, I get the following error: ERROR: Open cursor: ODBC--connection to 'DB2' failed. ERROR: Import unsuccessful. See SAS Log for details. When do I need to use ODBC and when do I not need it for reading Access databases? Is there some attribute of the 2nd database that I can change so that I don't require ODBC? Thanks, EP ...

Web resources about - MS Access 2002 problem: linked form fields in ODBC queries - comp.databases.ms-access

Resources last updated: 3/21/2016 6:00:10 AM