Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Migrating Access Program to ASP have problems with Yes/No Field

Reply
Thread Tools

Migrating Access Program to ASP have problems with Yes/No Field

 
 
A P
Guest
Posts: n/a
 
      09-24-2004
I am planning to migrate my exisiting MS Access program that uses yes/no
fields (checkbox). Can ASP identifies checkbox field of ms access? I am
planning to use the same database and use msacess for report generation and
web browser for encoding to the database.

Hope you could help me.

Me


 
Reply With Quote
 
 
 
 
David Morgan
Guest
Posts: n/a
 
      09-24-2004
The answer is yes.

When testing for 'yes' you would say

WHERE Field = 1

Or

WHERE Field = 'True'


"A P" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> I am planning to migrate my exisiting MS Access program that uses yes/no
> fields (checkbox). Can ASP identifies checkbox field of ms access? I am
> planning to use the same database and use msacess for report generation

and
> web browser for encoding to the database.
>
> Hope you could help me.
>
> Me
>
>



 
Reply With Quote
 
 
 
 
A P
Guest
Posts: n/a
 
      09-27-2004
I tried to access certain field with Yes/No data type from MS Access but IE
gave me an error message:

Microsoft JET Database Engine error '80040e07'
Data type mismatch in criteria expression.

What do I need to do?

"David Morgan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> The answer is yes.
>
> When testing for 'yes' you would say
>
> WHERE Field = 1
>
> Or
>
> WHERE Field = 'True'
>
>
> "A P" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > I am planning to migrate my exisiting MS Access program that uses yes/no
> > fields (checkbox). Can ASP identifies checkbox field of ms access? I am
> > planning to use the same database and use msacess for report generation

> and
> > web browser for encoding to the database.
> >
> > Hope you could help me.
> >
> > Me
> >
> >

>
>



 
Reply With Quote
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      09-27-2004
It's hard to say without seeing what your query is, i.e.

Response.write sqlString
response.end

Try using:

where fieldname=true

instead of
where fieldname='true'
if that's what you were using.

Ray at home

"A P" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I tried to access certain field with Yes/No data type from MS Access but IE
> gave me an error message:
>
> Microsoft JET Database Engine error '80040e07'
> Data type mismatch in criteria expression.
>
> What do I need to do?
>
> "David Morgan" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> The answer is yes.
>>
>> When testing for 'yes' you would say
>>
>> WHERE Field = 1
>>
>> Or
>>
>> WHERE Field = 'True'
>>
>>
>> "A P" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>> > I am planning to migrate my exisiting MS Access program that uses
>> > yes/no
>> > fields (checkbox). Can ASP identifies checkbox field of ms access? I am
>> > planning to use the same database and use msacess for report generation

>> and
>> > web browser for encoding to the database.
>> >
>> > Hope you could help me.
>> >
>> > Me
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
A P
Guest
Posts: n/a
 
      09-27-2004
The error was gone but I think the query cannot find what I'm looking for.

SELECT * FROM tblform WHERE Served = True

Note that Served field is a Yes/No MS Access Data Type.

Me


"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:(E-Mail Removed)...
> It's hard to say without seeing what your query is, i.e.
>
> Response.write sqlString
> response.end
>
> Try using:
>
> where fieldname=true
>
> instead of
> where fieldname='true'
> if that's what you were using.
>
> Ray at home
>
> "A P" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I tried to access certain field with Yes/No data type from MS Access but

IE
> > gave me an error message:
> >
> > Microsoft JET Database Engine error '80040e07'
> > Data type mismatch in criteria expression.
> >
> > What do I need to do?
> >
> > "David Morgan" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> The answer is yes.
> >>
> >> When testing for 'yes' you would say
> >>
> >> WHERE Field = 1
> >>
> >> Or
> >>
> >> WHERE Field = 'True'
> >>
> >>
> >> "A P" <(E-Mail Removed)> wrote in message
> >> news:%(E-Mail Removed)...
> >> > I am planning to migrate my exisiting MS Access program that uses
> >> > yes/no
> >> > fields (checkbox). Can ASP identifies checkbox field of ms access? I

am
> >> > planning to use the same database and use msacess for report

generation
> >> and
> >> > web browser for encoding to the database.
> >> >
> >> > Hope you could help me.
> >> >
> >> > Me
> >> >
> >> >
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      09-27-2004
You need to use the numeric representations of true/false:
SELECT * FROM tblform WHERE Served = -1

Bob Barrows

A P wrote:
> The error was gone but I think the query cannot find what I'm looking
> for.
>
> SELECT * FROM tblform WHERE Served = True
>
> Note that Served field is a Yes/No MS Access Data Type.
>
> Me
>
>
> "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote
> in message news:(E-Mail Removed)...
>> It's hard to say without seeing what your query is, i.e.
>>
>> Response.write sqlString
>> response.end
>>
>> Try using:
>>
>> where fieldname=true
>>
>> instead of
>> where fieldname='true'
>> if that's what you were using.
>>
>> Ray at home
>>
>> "A P" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> I tried to access certain field with Yes/No data type from MS
>>> Access but IE gave me an error message:
>>>
>>> Microsoft JET Database Engine error '80040e07'
>>> Data type mismatch in criteria expression.
>>>
>>> What do I need to do?
>>>
>>> "David Morgan" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> The answer is yes.
>>>>
>>>> When testing for 'yes' you would say
>>>>
>>>> WHERE Field = 1
>>>>
>>>> Or
>>>>
>>>> WHERE Field = 'True'
>>>>
>>>>
>>>> "A P" <(E-Mail Removed)> wrote in message
>>>> news:%(E-Mail Removed)...
>>>>> I am planning to migrate my exisiting MS Access program that uses
>>>>> yes/no
>>>>> fields (checkbox). Can ASP identifies checkbox field of ms
>>>>> access? I am planning to use the same database and use msacess
>>>>> for report generation and web browser for encoding to the
>>>>> database.
>>>>>
>>>>> Hope you could help me.
>>>>>
>>>>> Me


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
 
 
Reply

Thread Tools

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
javascript validation for a not required field, field is onlyrequired if another field has a value jr Javascript 3 07-08-2010 10:33 AM
1.Enter space bar for field names and save the field.The field shoud not get saved and an alert should be there as"Space bars are not allowed" Sound Javascript 2 09-28-2006 02:43 PM
Migrating ASP & COM+ to ASP .NET =?Utf-8?B?TWlrZSBUb3dlcnM=?= ASP .Net 11 11-30-2004 10:45 PM
Length of an if statement in dotnet (migrating from asp to asp.net) ASP .Net 5 05-28-2004 05:46 PM
migrating Access app to ASP.NET? Jerome ASP .Net 3 04-30-2004 02:51 PM



Advertisments