RE: Access project vs. Access db



Hi, Brian.

> what is the correct syntax for Boolean
> checks?

Try:

If DCount("[UserID]", "[UserRoles]", "[UserID] = '" & [UserId] & _
"' and [Role] = 'Application' and Active = " & True) > 0 Then

> have you any opinions on
> whether/when one is prefereable to the other as a backend?

I haven't used SQL Express 2005 (beta) yet, but I know the capabilities are
superior to MSDE, which is six year old technology. However, using an ADP
instead of an MDB limits the capabilities of the front-end database
application. Code and techniques that work fine in an MDB don't always work
in an ADP. If you have a somewhat complex application, you are going to make
some aggravating discoveries after you migrate. If it's possible to link the
tables to SQL Express 2005 (I don't know as I haven't tried), then go that
route with an MDB database file instead. And if you can't, I'd recommend a
client/server database, such as SQL Server or Oracle to link the tables to
from the MDB front-end.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
Beware to those who use munged addresses: known newsgroup E-mail harvesters
for spammers are Ripley@xxxxxxxxxxxxxxx and scott@xxxxxxxxxxxxxxxxxx

- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts as "Answers,"
so that all may benefit by filtering on "Answered questions" and quickly
finding the right answers to similar questions. Remember that questions
answered the quickest are often from those who have a history of rewarding
the contributors who have taken the time to answer questions correctly.


"Brian" wrote:

> Thanks. Good info at those links. There are times when I wish Access was not
> so forgiving about accomodating these things because it lets me get into bad
> habits that can be hard to break later. I will probably find the answer in
> the SQL docs, but in the meantime, what is the correct syntax for Boolean
> checks? The field in my example is a Yes/No field called Active, and I
> already tried leaving out the " = True" (i.e. just "If Active...", which I
> use successfully throughout my current Access mdb fe/be structure), but got
> an error on this also.
>
> Also, since I am just starting to migrate and have the opportunity to go
> with either MSDE 2000 or SQL Express 2005, have you any opinions on
> whether/when one is prefereable to the other as a backend?
>
> "'69 Camaro" wrote:
>
> > Hi, Brian.
> >
> > > 1. This line give me an "Invalid column name 'True'" error. Why?
> >
> > Because the syntax you are using is asking the database engine to compare
> > the value in the "Active" column with the value in the "True" column for each
> > record. Unless you actually had a field in your MDB database table named
> > "True" holding a Boolean value, the block of code below this IF statement
> > will never execute, because no records will ever meet the condition "Active =
> > True." Jet won't warn you of this logic error, but SQL Server does.
> >
> > > 2. Where can I get general/ongoing help with what may be a host of these
> > > little syntax (?) changes when migrating from Access fe/be to Access project
> > > / SQL?
> >
> > Download the SQL Server Books Online (BOL) on the following Web page:
> >
> > http://www.microsoft.com/downloads/details.aspx?FamilyID=a6f79cb1-a420-445f-8a4b-bd77a7da194b&DisplayLang=en
> >
> > As a quick reference, please see the following Web page for Jet 4.0 Reserved
> > words to avoid, which are ANSI SQL-92 compliant, which is used for SQL Server
> > 2000 and MSDE:
> >
> > http://support.microsoft.com/?id=321266
> >
> > HTH.
> >
> > Gunny
> >
> > See http://www.QBuilt.com for all your database needs.
> > See http://www.Access.QBuilt.com for Microsoft Access tips.
> >
> > (Please remove ZERO_SPAM from my reply E-mail address, so that a message
> > will be forwarded to me.)
> > Beware to those who use munged addresses: known newsgroup E-mail harvesters
> > for spammers are Ripley@xxxxxxxxxxxxxxx and scott@xxxxxxxxxxxxxxxxxx
> >
> > - - -
> > When you see correct answers to your question posted in Microsoft's Online
> > Community, please sign in to the Community and mark these posts as "Answers,"
> > so that all may benefit by filtering on "Answered questions" and quickly
> > finding the right answers to similar questions. Remember that questions
> > answered the quickest are often from those who have a history of rewarding
> > the contributors who have taken the time to answer questions correctly.
> >
> >
> > "Brian" wrote:
> >
> > > I'm just beginning to experiment with upsizing from .mdb's to SQL using the
> > > upsizing wizard. One specific question, one general question:
> > >
> > > 1. This line give me an "Invalid column name 'True'" error. Why? Active is
> > > the name of a Yes/No field that upsized OK. I can look at the table and see
> > > it just fine.
> > >
> > > If DCount("[UserID]", "[UserRoles]", "[UserID] = '" & [UserID] & "' and
> > > [Role] = 'Application' and Active = True") > 0
> > >
> > > 2. Where can I get general/ongoing help with what may be a host of these
> > > little syntax (?) changes when migrating from Access fe/be to Access project
> > > / SQL?
.



Relevant Pages

  • RE: database options with SBS 2003 R2
    ... It was doable for the customer to design their own access database in a peer ... If you don't want to deal with a version of SQL Server for the data, ... end MDB files. ...
    (microsoft.public.windows.server.sbs)
  • Re: Access 2002 Upsizing Wizard does not copy forms
    ... Upsizing *.mdb to SQL Server, using Upsizing Wizard, ONLY transfer data from ... Jet database to a SQL Server database (either new or existing, ...
    (microsoft.public.access.adp.sqlserver)
  • Re: database options with SBS 2003 R2
    ... MSDE is the lightweight, free version of SQL Server 2000 which you can use ... as a backend database for a client-server application. ... end MDB files. ...
    (microsoft.public.windows.server.sbs)
  • Re: Guide for switching to .ADP from .MDB
    ... >Create an Access database front-end to an SQL Server database back-end ... and the SQL Server provides centralized data ... >an MDB application from Access to SQL server. ...
    (microsoft.public.access.adp.sqlserver)
  • SQL Server tables not owned by "dbo" - how to reference them?
    ... I have a SQL Server 2000 database which has been restored from a ... The restored database contained a user called "X", ... even though the ODBC data source has been set up with the user ... Can anyone tell what the correct syntax should be to ...
    (comp.lang.java.databases)

Quantcast