Hi
For inserting one record into ur database r u using insert into syntax or add 
new if u use the later one and with the check that given by you ,you will not 
face problem while insertion.
before that please check for those column fields are nullable or not if not 
make those nullable then i think ypur problem will over.
for example
RsObj.Addnew
    RsObj(Fieldname1)=value
    if request.form("idaValue")<>"" then
       RsObj(Fieldname2)=request.form("idaValue")
    end if
    and so on......
RsObj.update

"Grinwald, Uri" <[EMAIL PROTECTED]> wrote:
Hi.

I was wondering if someone could please assist me.
I am collecting values from a form to insert into an Access DB.

Two of my form fields are of the data type numbers and when the user
leaves these fields blank I get a syntax error in my insert statement.
In my DB those fields arew not required.

I tried the following code but I still have no luck.

idaValue = Request.Form("idaValue")
if idaValue = "" then
idaValue = null
end if

As a test I trield hard codinf any value which does work.

idaValue = Request.Form("idaValue")
if idaValue = "" then
idaValue = 0
end if 

Any ideas how I can keep the field blank and return no errors?

Thanks
Uri


SPONSORED LINKS 
Programming languages C programming language Computer programming languages 
Java programming language C programming language History of computer 
programming language 

---------------------------------
YAHOO! GROUPS LINKS 


    Visit your group "AspClassicAnyQuestionIsOk" on the web.
  
    To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
  
    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


---------------------------------



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to