Deleting a field value

J

Jeff

Ok, I am using asp that has SQL in it.
I couldn't find a proper SQL NG, so I will post it in here and see if I can
obtain help.

I need a statement that will delete any value in a said field. For example:

strSQL = "UPDATE rounds set Rd3 = '' where name = '" & var2 & "' and meeting
= " & var1 & ""
conn.execute (strSQL)

this, however returns the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver] Field 'rounds.Rd3' cannot be a
zero-length string.

/GIG/iht_delete_scoreasp.asp, line 37

how can I write this so it deletes any value in that field?



thanks for any help

Bam
 
B

Bob Barrows [MVP]

Open your database in Access, open the rounds table in Design view,
highlight the Rd3 field, and set the "Allow zero-length string" property to
True.

Bob Barrows
Jeff said:
I forgot to mention, this is on an Access DB


Jeff said:
Ok, I am using asp that has SQL in it.
I couldn't find a proper SQL NG, so I will post it in here and see
if I can obtain help.

I need a statement that will delete any value in a said field. For
example:

strSQL = "UPDATE rounds set Rd3 = '' where name = '" & var2 & "' and
meeting = " & var1 & ""
conn.execute (strSQL)

this, however returns the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver] Field 'rounds.Rd3' cannot
be a zero-length string.

/GIG/iht_delete_scoreasp.asp, line 37

how can I write this so it deletes any value in that field?



thanks for any help

Bam
 
J

Jeff

Bob, UDAMAN !!!!!
Thanks a bunch bud
Bam


Bob Barrows said:
Open your database in Access, open the rounds table in Design view,
highlight the Rd3 field, and set the "Allow zero-length string" property
to
True.

Bob Barrows
Jeff said:
I forgot to mention, this is on an Access DB


Jeff said:
Ok, I am using asp that has SQL in it.
I couldn't find a proper SQL NG, so I will post it in here and see
if I can obtain help.

I need a statement that will delete any value in a said field. For
example:

strSQL = "UPDATE rounds set Rd3 = '' where name = '" & var2 & "' and
meeting = " & var1 & ""
conn.execute (strSQL)

this, however returns the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver] Field 'rounds.Rd3' cannot
be a zero-length string.

/GIG/iht_delete_scoreasp.asp, line 37

how can I write this so it deletes any value in that field?



thanks for any help

Bam

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
 
J

John Blessing

Jeff said:
Ok, I am using asp that has SQL in it.
I couldn't find a proper SQL NG, so I will post it in here and see if I
can obtain help.

I need a statement that will delete any value in a said field. For
example:

strSQL = "UPDATE rounds set Rd3 = '' where name = '" & var2 & "' and
meeting = " & var1 & ""
conn.execute (strSQL)

this, however returns the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver] Field 'rounds.Rd3' cannot be a
zero-length string.

/GIG/iht_delete_scoreasp.asp, line 37

how can I write this so it deletes any value in that field?



thanks for any help

Bam

update table set column1= null, column2=null

Regardless of if it is set to allow zero length strings.

--
John Blessing

http://www.LbeHelpdesk.com - Help Desk software priced to suit all
businesses
http://www.room-booking-software.com - Schedule rooms & equipment bookings
for your meeting/class over the web.
http://www.lbetoolbox.com - Remove Duplicates from MS Outlook
http://www.outlook-find-replace.com - Find & Replace in Emails, Contacts,
Appointments, Tasks and Notes
http://www.schedule-email.com - Schedule multiple individual
emails/newsletters
 
B

Bob Barrows [MVP]

John said:
update table set column1= null, column2=null

Regardless of if it is set to allow zero length strings.
:)
Not if its Required property is set to True ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,174
Latest member
BlissKetoACV
Top