Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format of SQL in ADP Files

Status
Not open for further replies.

asafb

Programmer
Jun 17, 2003
80
US
Hello, I have a mdb file i just converted to adp, loaded with problems.

First, there is a combobox in date format that you enter a date
then hit a button and it retrieves all the records with that date.
However now in adp mode it doesn't work, it pops up with a parameter instead of reading it from the form

can you guys help out?

name of form: form1
name of text field: date
name of button: command150

so it says

SELECT from tablename where dateentered = forms!administratorok!date

i understand now it converted it to

forms_administratorok_date, why the underline ?

what is the big change here? help!!!

thanks
asafb
 
I'm not sure about the underscores but 'date' is a reserver word in just about all programming languages. Either change the field name or bracket references to it. HTH
 
ADP = Microsoft Access Project File

You can use Access 2002 to create an Access project (.adp) file. This file contains information that is used to create and connect to an MSDE 2000 database.
 
It really doesn't matter that you have an .ADP file rather than an .MDB file but what REALLY matters is the database engine. Are you using Jet or SQL Server/MSDE.

|MDB => Jet 4.0
|ADP => Jet 4.0
ADP => SQL Server

The two front ends listed first both access a Jet database engine which uses the same delimiters but when the ADP connects to a SQL Server database all bets are off. Below is merely an example of the differences.

EQUIVALENT WHERE STATEMENTS
Wildcard in Jet = * (WHERE ID = 'SM*')
Wildcard in SQL Server = % (WHERE ID = N'SM%')
Date delimiter in Jet = #
Date delimiter in SQL Server = ?????

In whatever engine you use create a query/stored procedure that uses a data parameter and determine what the query builder uses as the delimiter for a date.



---------------------
scking@arinc.com
---------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top