navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Free FrontPage Templates

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

update DB

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> update DB
Page: [1]
 
kmc

 

Posts: 108
Joined: 3/8/2002
From:
Status: offline

 
update DB - 3/29/2002 16:46:03   
I want to be able to update a DB with some empty fields. I already have an update form that submits the update through another page. But when some of the fields are blank it gives me an error message that some of the fields are blank. I sometimes don't want to update but 1 field out of 3. How can I update just one of so many or can a page be setup where it displays the info in each text boxes that I can edit if I want to then hit an update button on the form. I hope that I haven't made it too hard to understand.

davebukouricz

 

Posts: 300
From: Ma None
Status: offline

 
RE: update DB - 3/29/2002 19:30:18   
There are a couple of ways to approach this;
What are the data types for the fields? If they are text or memo types then you can set the field settings to accept zero length strings.
If you need to have any other type then you can test for empty before the laod to the database.
In your upload form you will want to do something like this;
strfield = request("field")
strfield1 = request("field1")
strfield2 = request("field2")
if strfield >"" then
your addnew or update query here
End if
if strfield1 >"" then
your addnew or update query here
End if
if strfield2 >"" then
your addnew or update query here
End if





<%Do While still looking down at the grass instead of up at the roots%>
Dave

(in reply to kmc)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> update DB
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts