PC Review


Reply
Thread Tools Rate Thread

Custom SQL question...

 
 
skc
Guest
Posts: n/a
 
      17th Aug 2004
I have developed a custom web application, where I am
updating a record in my Access 2000 table using the UPDATE
query.

Now I wish to blank some fields from a record. I am using
the syntax:

UPDATE tablename Set fieldtoblank1=' ', fieldtoblank2=' '
WHERE ID='::ID::'

....but this does not work.

I need help.

Thanks,

skc
 
Reply With Quote
 
 
 
 
Bob Lehmann
Guest
Posts: n/a
 
      17th Aug 2004
Not sure what "doesn't work" means, but if ID is numeric, remove the ticks.

Bob Lehmann

"skc" <(E-Mail Removed)> wrote in message
news:044901c4844a$233bbb60$(E-Mail Removed)...
> I have developed a custom web application, where I am
> updating a record in my Access 2000 table using the UPDATE
> query.
>
> Now I wish to blank some fields from a record. I am using
> the syntax:
>
> UPDATE tablename Set fieldtoblank1=' ', fieldtoblank2=' '
> WHERE ID='::ID::'
>
> ...but this does not work.
>
> I need help.
>
> Thanks,
>
> skc



 
Reply With Quote
 
skc
Guest
Posts: n/a
 
      17th Aug 2004
Still does not work.

I get "Data type mismatch..." - it is as if I am saving a
character space into the field instead of
deleting/blanking it.

I am doing something wrong here.

>-----Original Message-----
>Not sure what "doesn't work" means, but if ID is numeric,

remove the ticks.
>
>Bob Lehmann
>
>"skc" <(E-Mail Removed)> wrote in

message
>news:044901c4844a$233bbb60$(E-Mail Removed)...
>> I have developed a custom web application, where I am
>> updating a record in my Access 2000 table using the

UPDATE
>> query.
>>
>> Now I wish to blank some fields from a record. I am

using
>> the syntax:
>>
>> UPDATE tablename Set fieldtoblank1=' ',

fieldtoblank2=' '
>> WHERE ID='::ID::'
>>
>> ...but this does not work.
>>
>> I need help.
>>
>> Thanks,
>>
>> skc

>
>
>.
>

 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      17th Aug 2004
You need to check your database field attributes to allow Nulls values.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"skc" <(E-Mail Removed)> wrote in message
news:044901c4844a$233bbb60$(E-Mail Removed)...
> I have developed a custom web application, where I am
> updating a record in my Access 2000 table using the UPDATE
> query.
>
> Now I wish to blank some fields from a record. I am using
> the syntax:
>
> UPDATE tablename Set fieldtoblank1=' ', fieldtoblank2=' '
> WHERE ID='::ID::'
>
> ...but this does not work.
>
> I need help.
>
> Thanks,
>
> skc



 
Reply With Quote
 
skc
Guest
Posts: n/a
 
      18th Aug 2004
Thomas,

I checked this and I have my 3 fields which I want to
blank using an update command set as:

1. Field1: Number
- Required = No

2. Field2: Text
- Required = No
- Allow zero length = Yes

3. Field3: Date/Time
- Required = No

Please advise - I believe that I have the correct settings?

Skc

>-----Original Message-----
>You need to check your database field attributes to allow

Nulls values.
>
>--
>==============================================
>Thomas A. Rowe (Microsoft MVP - FrontPage)
>WEBMASTER Resources(tm)
>http://www.ycoln-resources.com
>FrontPage Resources, WebCircle, MS KB Quick Links, etc.
>==============================================
>To assist you in getting the best answers for FrontPage

support see:
>http://www.net-sites.com/sitebuilder/newsgroups.asp
>
>"skc" <(E-Mail Removed)> wrote in

message
>news:044901c4844a$233bbb60$(E-Mail Removed)...
>> I have developed a custom web application, where I am
>> updating a record in my Access 2000 table using the

UPDATE
>> query.
>>
>> Now I wish to blank some fields from a record. I am

using
>> the syntax:
>>
>> UPDATE tablename Set fieldtoblank1=' ',

fieldtoblank2=' '
>> WHERE ID='::ID::'
>>
>> ...but this does not work.
>>
>> I need help.
>>
>> Thanks,
>>
>> skc

>
>
>.
>

 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      18th Aug 2004
Date/Time Fields are a problem, I am not sure how to set it to null/empty
Number fields, I would set to zero

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"skc" <(E-Mail Removed)> wrote in message
news:84e601c484fb$bebf1cb0$(E-Mail Removed)...
> Thomas,
>
> I checked this and I have my 3 fields which I want to
> blank using an update command set as:
>
> 1. Field1: Number
> - Required = No
>
> 2. Field2: Text
> - Required = No
> - Allow zero length = Yes
>
> 3. Field3: Date/Time
> - Required = No
>
> Please advise - I believe that I have the correct settings?
>
> Skc
>
> >-----Original Message-----
> >You need to check your database field attributes to allow

> Nulls values.
> >
> >--
> >==============================================
> >Thomas A. Rowe (Microsoft MVP - FrontPage)
> >WEBMASTER Resources(tm)
> >http://www.ycoln-resources.com
> >FrontPage Resources, WebCircle, MS KB Quick Links, etc.
> >==============================================
> >To assist you in getting the best answers for FrontPage

> support see:
> >http://www.net-sites.com/sitebuilder/newsgroups.asp
> >
> >"skc" <(E-Mail Removed)> wrote in

> message
> >news:044901c4844a$233bbb60$(E-Mail Removed)...
> >> I have developed a custom web application, where I am
> >> updating a record in my Access 2000 table using the

> UPDATE
> >> query.
> >>
> >> Now I wish to blank some fields from a record. I am

> using
> >> the syntax:
> >>
> >> UPDATE tablename Set fieldtoblank1=' ',

> fieldtoblank2=' '
> >> WHERE ID='::ID::'
> >>
> >> ...but this does not work.
> >>
> >> I need help.
> >>
> >> Thanks,
> >>
> >> skc

> >
> >
> >.
> >



 
Reply With Quote
 
skc
Guest
Posts: n/a
 
      18th Aug 2004
Thomas,

For number fields - you mean poke a zero '0' into the
field?

There must be another way to do all of this including the
date/time field.

skc

>-----Original Message-----
>Date/Time Fields are a problem, I am not sure how to set

it to null/empty
>Number fields, I would set to zero
>
>--
>==============================================
>Thomas A. Rowe (Microsoft MVP - FrontPage)
>WEBMASTER Resources(tm)
>http://www.ycoln-resources.com
>FrontPage Resources, WebCircle, MS KB Quick Links, etc.
>==============================================
>To assist you in getting the best answers for FrontPage

support see:
>http://www.net-sites.com/sitebuilder/newsgroups.asp
>
>"skc" <(E-Mail Removed)> wrote in

message
>news:84e601c484fb$bebf1cb0$(E-Mail Removed)...
>> Thomas,
>>
>> I checked this and I have my 3 fields which I want to
>> blank using an update command set as:
>>
>> 1. Field1: Number
>> - Required = No
>>
>> 2. Field2: Text
>> - Required = No
>> - Allow zero length = Yes
>>
>> 3. Field3: Date/Time
>> - Required = No
>>
>> Please advise - I believe that I have the correct

settings?
>>
>> Skc
>>
>> >-----Original Message-----
>> >You need to check your database field attributes to

allow
>> Nulls values.
>> >
>> >--
>> >==============================================
>> >Thomas A. Rowe (Microsoft MVP - FrontPage)
>> >WEBMASTER Resources(tm)
>> >http://www.ycoln-resources.com
>> >FrontPage Resources, WebCircle, MS KB Quick Links, etc.
>> >==============================================
>> >To assist you in getting the best answers for FrontPage

>> support see:
>> >http://www.net-sites.com/sitebuilder/newsgroups.asp
>> >
>> >"skc" <(E-Mail Removed)> wrote in

>> message
>> >news:044901c4844a$233bbb60$(E-Mail Removed)...
>> >> I have developed a custom web application, where I am
>> >> updating a record in my Access 2000 table using the

>> UPDATE
>> >> query.
>> >>
>> >> Now I wish to blank some fields from a record. I am

>> using
>> >> the syntax:
>> >>
>> >> UPDATE tablename Set fieldtoblank1=' ',

>> fieldtoblank2=' '
>> >> WHERE ID='::ID::'
>> >>
>> >> ...but this does not work.
>> >>
>> >> I need help.
>> >>
>> >> Thanks,
>> >>
>> >> skc
>> >
>> >
>> >.
>> >

>
>
>.
>

 
Reply With Quote
 
Bob Lehmann
Guest
Posts: n/a
 
      18th Aug 2004
You'll have to work out all the weird FP gunk like ::ID::

I also don't know what your table really looks like, or what datatype id is,
so you may have to make changes.

But this should work....
update table1 set field1=null, field2='CHANGED', field3=null
where id=1

Bob Lehmann

"skc" <(E-Mail Removed)> wrote in message
news:84e601c484fb$bebf1cb0$(E-Mail Removed)...
> Thomas,
>
> I checked this and I have my 3 fields which I want to
> blank using an update command set as:
>
> 1. Field1: Number
> - Required = No
>
> 2. Field2: Text
> - Required = No
> - Allow zero length = Yes
>
> 3. Field3: Date/Time
> - Required = No
>
> Please advise - I believe that I have the correct settings?
>
> Skc
>
> >-----Original Message-----
> >You need to check your database field attributes to allow

> Nulls values.
> >
> >--
> >==============================================
> >Thomas A. Rowe (Microsoft MVP - FrontPage)
> >WEBMASTER Resources(tm)
> >http://www.ycoln-resources.com
> >FrontPage Resources, WebCircle, MS KB Quick Links, etc.
> >==============================================
> >To assist you in getting the best answers for FrontPage

> support see:
> >http://www.net-sites.com/sitebuilder/newsgroups.asp
> >
> >"skc" <(E-Mail Removed)> wrote in

> message
> >news:044901c4844a$233bbb60$(E-Mail Removed)...
> >> I have developed a custom web application, where I am
> >> updating a record in my Access 2000 table using the

> UPDATE
> >> query.
> >>
> >> Now I wish to blank some fields from a record. I am

> using
> >> the syntax:
> >>
> >> UPDATE tablename Set fieldtoblank1=' ',

> fieldtoblank2=' '
> >> WHERE ID='::ID::'
> >>
> >> ...but this does not work.
> >>
> >> I need help.
> >>
> >> Thanks,
> >>
> >> skc

> >
> >
> >.
> >



 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      18th Aug 2004
See below.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"skc" <(E-Mail Removed)> wrote in message
news:898b01c4853e$01d52930$(E-Mail Removed)...
> Thomas,
>
> For number fields - you mean poke a zero '0' into the
> field?


Yes

>
> There must be another way to do all of this including the
> date/time field.


I have so far never had a need to clear a date field, but I do get errors if I leave it blank, after
it was filled in.


Have you considered storing this group of info in another table, where you could just delete the
record?

>
> skc
>
> >-----Original Message-----
> >Date/Time Fields are a problem, I am not sure how to set

> it to null/empty
> >Number fields, I would set to zero
> >
> >--
> >==============================================
> >Thomas A. Rowe (Microsoft MVP - FrontPage)
> >WEBMASTER Resources(tm)
> >http://www.ycoln-resources.com
> >FrontPage Resources, WebCircle, MS KB Quick Links, etc.
> >==============================================
> >To assist you in getting the best answers for FrontPage

> support see:
> >http://www.net-sites.com/sitebuilder/newsgroups.asp
> >
> >"skc" <(E-Mail Removed)> wrote in

> message
> >news:84e601c484fb$bebf1cb0$(E-Mail Removed)...
> >> Thomas,
> >>
> >> I checked this and I have my 3 fields which I want to
> >> blank using an update command set as:
> >>
> >> 1. Field1: Number
> >> - Required = No
> >>
> >> 2. Field2: Text
> >> - Required = No
> >> - Allow zero length = Yes
> >>
> >> 3. Field3: Date/Time
> >> - Required = No
> >>
> >> Please advise - I believe that I have the correct

> settings?
> >>
> >> Skc
> >>
> >> >-----Original Message-----
> >> >You need to check your database field attributes to

> allow
> >> Nulls values.
> >> >
> >> >--
> >> >==============================================
> >> >Thomas A. Rowe (Microsoft MVP - FrontPage)
> >> >WEBMASTER Resources(tm)
> >> >http://www.ycoln-resources.com
> >> >FrontPage Resources, WebCircle, MS KB Quick Links, etc.
> >> >==============================================
> >> >To assist you in getting the best answers for FrontPage
> >> support see:
> >> >http://www.net-sites.com/sitebuilder/newsgroups.asp
> >> >
> >> >"skc" <(E-Mail Removed)> wrote in
> >> message
> >> >news:044901c4844a$233bbb60$(E-Mail Removed)...
> >> >> I have developed a custom web application, where I am
> >> >> updating a record in my Access 2000 table using the
> >> UPDATE
> >> >> query.
> >> >>
> >> >> Now I wish to blank some fields from a record. I am
> >> using
> >> >> the syntax:
> >> >>
> >> >> UPDATE tablename Set fieldtoblank1=' ',
> >> fieldtoblank2=' '
> >> >> WHERE ID='::ID::'
> >> >>
> >> >> ...but this does not work.
> >> >>
> >> >> I need help.
> >> >>
> >> >> Thanks,
> >> >>
> >> >> skc
> >> >
> >> >
> >> >.
> >> >

> >
> >
> >.
> >



 
Reply With Quote
 
Bob Lehmann
Guest
Posts: n/a
 
      19th Aug 2004
There is. See my answer.


Bob Lehmann

"skc" <(E-Mail Removed)> wrote in message
news:898b01c4853e$01d52930$(E-Mail Removed)...
> Thomas,
>
> For number fields - you mean poke a zero '0' into the
> field?
>
> There must be another way to do all of this including the
> date/time field.
>
> skc
>
> >-----Original Message-----
> >Date/Time Fields are a problem, I am not sure how to set

> it to null/empty
> >Number fields, I would set to zero
> >
> >--
> >==============================================
> >Thomas A. Rowe (Microsoft MVP - FrontPage)
> >WEBMASTER Resources(tm)
> >http://www.ycoln-resources.com
> >FrontPage Resources, WebCircle, MS KB Quick Links, etc.
> >==============================================
> >To assist you in getting the best answers for FrontPage

> support see:
> >http://www.net-sites.com/sitebuilder/newsgroups.asp
> >
> >"skc" <(E-Mail Removed)> wrote in

> message
> >news:84e601c484fb$bebf1cb0$(E-Mail Removed)...
> >> Thomas,
> >>
> >> I checked this and I have my 3 fields which I want to
> >> blank using an update command set as:
> >>
> >> 1. Field1: Number
> >> - Required = No
> >>
> >> 2. Field2: Text
> >> - Required = No
> >> - Allow zero length = Yes
> >>
> >> 3. Field3: Date/Time
> >> - Required = No
> >>
> >> Please advise - I believe that I have the correct

> settings?
> >>
> >> Skc
> >>
> >> >-----Original Message-----
> >> >You need to check your database field attributes to

> allow
> >> Nulls values.
> >> >
> >> >--
> >> >==============================================
> >> >Thomas A. Rowe (Microsoft MVP - FrontPage)
> >> >WEBMASTER Resources(tm)
> >> >http://www.ycoln-resources.com
> >> >FrontPage Resources, WebCircle, MS KB Quick Links, etc.
> >> >==============================================
> >> >To assist you in getting the best answers for FrontPage
> >> support see:
> >> >http://www.net-sites.com/sitebuilder/newsgroups.asp
> >> >
> >> >"skc" <(E-Mail Removed)> wrote in
> >> message
> >> >news:044901c4844a$233bbb60$(E-Mail Removed)...
> >> >> I have developed a custom web application, where I am
> >> >> updating a record in my Access 2000 table using the
> >> UPDATE
> >> >> query.
> >> >>
> >> >> Now I wish to blank some fields from a record. I am
> >> using
> >> >> the syntax:
> >> >>
> >> >> UPDATE tablename Set fieldtoblank1=' ',
> >> fieldtoblank2=' '
> >> >> WHERE ID='::ID::'
> >> >>
> >> >> ...but this does not work.
> >> >>
> >> >> I need help.
> >> >>
> >> >> Thanks,
> >> >>
> >> >> skc
> >> >
> >> >
> >> >.
> >> >

> >
> >
> >.
> >



 
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
Custom Form Question Randal W. Hozeski Microsoft Outlook Program Addins 4 16th Jul 2004 04:03 PM
Custom Action Question... Robert Grandidier Microsoft Outlook Program Addins 1 12th Mar 2004 02:18 PM
Custom color question + smooth chart curves question Gern Blanston Microsoft Excel Charting 2 14th Nov 2003 02:42 AM
Custom color question + smooth chart curves question Gern Blanston Microsoft Excel Misc 1 13th Nov 2003 01:02 PM
Question: Invoking custom file type (file associated with custom app) VB Programmer Microsoft ASP .NET 1 3rd Nov 2003 11:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:41 AM.