PC Review


Reply
Thread Tools Rate Thread

access front end and sql server back end

 
 
seeker
Guest
Posts: n/a
 
      10th Feb 2009
Our front ends for our data is in access and has all the queries, forms, and
reports with linked tables to a sql server back end. My question is when i
write select, update, insert into, or even delete queries in the front end do
I use # # for dates or ' ' for dates?
 
Reply With Quote
 
 
 
 
Dale Fye
Guest
Posts: n/a
 
      11th Feb 2009
As I recall, this depends on your query.

If you are updating a linked table, I believe the appropriate delimiter is #

However, if you are writing a Pass-thru query, I believe the delimiter is
the apostrophe.

HTH
Dale


"seeker" <(E-Mail Removed)> wrote in message
news:6673DBF6-F804-4EEB-A3AA-(E-Mail Removed)...
> Our front ends for our data is in access and has all the queries, forms,
> and
> reports with linked tables to a sql server back end. My question is when
> i
> write select, update, insert into, or even delete queries in the front end
> do
> I use # # for dates or ' ' for dates?



 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      11th Feb 2009
On Tue, 10 Feb 2009 14:01:01 -0800, seeker <(E-Mail Removed)>
wrote:

>Our front ends for our data is in access and has all the queries, forms, and
>reports with linked tables to a sql server back end. My question is when i
>write select, update, insert into, or even delete queries in the front end do
>I use # # for dates or ' ' for dates?


If you're using a linked table, the query will be in Access syntax - with a #
date delimiter, your choice of ' or " delimiters for text, etc. If you use a
PassThrough query you will use SQL/Server syntax.
--

John W. Vinson [MVP]
 
Reply With Quote
 
seeker
Guest
Posts: n/a
 
      11th Feb 2009
Thank you to the two of you. Does the syntax make a difference if the sql
script is embedded in the vba that is run by a button on a form? When the
sql script is embedded within vba should the dates be #??/??/??# or
'??/??/???? 00:00:00'

"John W. Vinson" wrote:

> On Tue, 10 Feb 2009 14:01:01 -0800, seeker <(E-Mail Removed)>
> wrote:
>
> >Our front ends for our data is in access and has all the queries, forms, and
> >reports with linked tables to a sql server back end. My question is when i
> >write select, update, insert into, or even delete queries in the front end do
> >I use # # for dates or ' ' for dates?

>
> If you're using a linked table, the query will be in Access syntax - with a #
> date delimiter, your choice of ' or " delimiters for text, etc. If you use a
> PassThrough query you will use SQL/Server syntax.
> --
>
> John W. Vinson [MVP]
>

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      11th Feb 2009
On Tue, 10 Feb 2009 21:54:01 -0800, seeker <(E-Mail Removed)>
wrote:

>Thank you to the two of you. Does the syntax make a difference if the sql
>script is embedded in the vba that is run by a button on a form?


No. It's still processed by the JET/ACE database engine and automatically
translated to SQL/Server syntax for you; use the JET conventions.
--

John W. Vinson [MVP]
 
Reply With Quote
 
seeker
Guest
Posts: n/a
 
      11th Feb 2009
ok i have an update query as follows
update los_service set los_end_time = #10:15:00 am#, nbr_of_minutes = 105
where member_number = 942 and los_service_date = #2/5/2009# and los_beg_time
= #08:30:00 am# and los_end_time = #10:30:00 am#

this does not update the table I have tried changing time to hh:mm AM/PM
and that does not work either. What is wrong????

"John W. Vinson" wrote:

> On Tue, 10 Feb 2009 21:54:01 -0800, seeker <(E-Mail Removed)>
> wrote:
>
> >Thank you to the two of you. Does the syntax make a difference if the sql
> >script is embedded in the vba that is run by a button on a form?

>
> No. It's still processed by the JET/ACE database engine and automatically
> translated to SQL/Server syntax for you; use the JET conventions.
> --
>
> John W. Vinson [MVP]
>

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      11th Feb 2009
On Wed, 11 Feb 2009 08:09:02 -0800, seeker <(E-Mail Removed)>
wrote:

>ok i have an update query as follows
> update los_service set los_end_time = #10:15:00 am#, nbr_of_minutes = 105
>where member_number = 942 and los_service_date = #2/5/2009# and los_beg_time
>= #08:30:00 am# and los_end_time = #10:30:00 am#
>
>this does not update the table I have tried changing time to hh:mm AM/PM
>and that does not work either. What is wrong????


Presumably there is no record in the table where those criteria are met
exactly. A Date/TIme field is actually a Double Float count of days and
fractions of a day (times) since midnight, December 30, 1899; the Double has
an accuracy of microseconds, even though you can only display a time to the
second.

What do you see if you just do a select query

SELECT los_beg_time, los_end_time from los_service
WHERE member_number = 942 and los_service_date = #2/5/2009#;

--

John W. Vinson [MVP]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MS ACCESS Front end With SQL Server Back end Titlepusher Microsoft Access 9 19th Mar 2009 03:32 AM
using Access 2007 as front-end to SQL Server back-end Tom B. Microsoft Access 15 3rd Jan 2009 05:16 AM
Re: Access Front End - SQL Server Back End Douglas J. Steele Microsoft Access 1 1st Dec 2006 09:08 PM
RE: Access Front End - SQL Server Back End =?Utf-8?B?QW5keSBIdWxs?= Microsoft Access 1 1st Dec 2006 12:15 PM
Access as front end, SQL server as back end ming Microsoft Access ADP SQL Server 7 30th Jun 2004 05:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:34 PM.