Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   Migrating Access Program to ASP have problems with Yes/No Field (http://www.velocityreviews.com/forums/t796470-migrating-access-program-to-asp-have-problems-with-yes-no-field.html)

A P 09-24-2004 05:02 AM

Migrating Access Program to ASP have problems with Yes/No Field
 
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



David Morgan 09-24-2004 11:15 AM

Re: Migrating Access Program to ASP have problems with Yes/No Field
 
The answer is yes.

When testing for 'yes' you would say

WHERE Field = 1

Or

WHERE Field = 'True'


"A P" <ap@textguru.ph> wrote in message
news:%23Ju0DOfoEHA.536@TK2MSFTNGP11.phx.gbl...
> 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
>
>




A P 09-27-2004 05:33 AM

Re: Migrating Access Program to ASP have problems with Yes/No Field
 
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" <david@davidmorgan.me.uk> wrote in message
news:e4v79eioEHA.3728@TK2MSFTNGP09.phx.gbl...
> The answer is yes.
>
> When testing for 'yes' you would say
>
> WHERE Field = 1
>
> Or
>
> WHERE Field = 'True'
>
>
> "A P" <ap@textguru.ph> wrote in message
> news:%23Ju0DOfoEHA.536@TK2MSFTNGP11.phx.gbl...
> > 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
> >
> >

>
>




Ray Costanzo [MVP] 09-27-2004 05:56 AM

Re: Migrating Access Program to ASP have problems with Yes/No Field
 
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" <ap@textguru.ph> wrote in message
news:eKIerNFpEHA.2900@TK2MSFTNGP12.phx.gbl...
>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" <david@davidmorgan.me.uk> wrote in message
> news:e4v79eioEHA.3728@TK2MSFTNGP09.phx.gbl...
>> The answer is yes.
>>
>> When testing for 'yes' you would say
>>
>> WHERE Field = 1
>>
>> Or
>>
>> WHERE Field = 'True'
>>
>>
>> "A P" <ap@textguru.ph> wrote in message
>> news:%23Ju0DOfoEHA.536@TK2MSFTNGP11.phx.gbl...
>> > 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
>> >
>> >

>>
>>

>
>




A P 09-27-2004 08:59 AM

Re: Migrating Access Program to ASP have problems with Yes/No Field
 
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:u9BJlaFpEHA.692@TK2MSFTNGP12.phx.gbl...
> 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" <ap@textguru.ph> wrote in message
> news:eKIerNFpEHA.2900@TK2MSFTNGP12.phx.gbl...
> >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" <david@davidmorgan.me.uk> wrote in message
> > news:e4v79eioEHA.3728@TK2MSFTNGP09.phx.gbl...
> >> The answer is yes.
> >>
> >> When testing for 'yes' you would say
> >>
> >> WHERE Field = 1
> >>
> >> Or
> >>
> >> WHERE Field = 'True'
> >>
> >>
> >> "A P" <ap@textguru.ph> wrote in message
> >> news:%23Ju0DOfoEHA.536@TK2MSFTNGP11.phx.gbl...
> >> > 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
> >> >
> >> >
> >>
> >>

> >
> >

>
>




Bob Barrows [MVP] 09-27-2004 11:07 AM

Re: Migrating Access Program to ASP have problems with Yes/No Field
 
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:u9BJlaFpEHA.692@TK2MSFTNGP12.phx.gbl...
>> 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" <ap@textguru.ph> wrote in message
>> news:eKIerNFpEHA.2900@TK2MSFTNGP12.phx.gbl...
>>> 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" <david@davidmorgan.me.uk> wrote in message
>>> news:e4v79eioEHA.3728@TK2MSFTNGP09.phx.gbl...
>>>> The answer is yes.
>>>>
>>>> When testing for 'yes' you would say
>>>>
>>>> WHERE Field = 1
>>>>
>>>> Or
>>>>
>>>> WHERE Field = 'True'
>>>>
>>>>
>>>> "A P" <ap@textguru.ph> wrote in message
>>>> news:%23Ju0DOfoEHA.536@TK2MSFTNGP11.phx.gbl...
>>>>> 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"




All times are GMT. The time now is 11:17 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.