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?
:
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/...b1-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 (e-mail address removed) and (e-mail address removed)
- - -
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.
:
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?