Ask a Question related to ASP Database, Design and Development.
-
William E Hatto #1
Zero length strings
Hi All,
What is the best way to handle zero length variables when inserting data
into a table. I have text field and date fields, both of which have no data
in them from time to time.
I have been using this for the text fields.
If myData="" then myData=" "
I have used the same for dates.
Is this OK to use or is there a better way.
Thanks in advance,
Bill.
William E Hatto Guest
-
Length cannot be less than zero. Parameter name: length
I receive the following error when I try to run this asp.net 1.1 app: Length cannot be less than zero. Parameter name: length Description: An... -
loadvariables get length
How can I get the length of the amount of data that a php script has pushed as a result of a loadvariables? -
Column only a certain length?
I want to have columns only be certain lengths, but if it goes over the length it will put "..." at the end. how do I do that? <td width="60px">... -
Extracting strings delimited by other strings
Hi, I need to write some code that will allowed embedded, specially formatted comments to document test cases within a program (SAS code). The... -
How to get length of string? length() problems
Simplified a bit, I'm parsing HTML documents to get sentences e.g. my $html = get($URL); # remove all HTML TAGs...blah blah blah @sentences =... -
Evertjan. #2
Re: Zero length strings
William E Hatto wrote on 13 jun 2004 in
microsoft.public.inetserver.asp.db:
A string text field can have an empty string> What is the best way to handle zero length variables when inserting
> data into a table. I have text field and date fields, both of which
> have no data in them from time to time.
>
> I have been using this for the text fields.
>
> If myData="" then myData=" "
>
> I have used the same for dates.
>
> Is this OK to use or is there a better way.
>
A date field must be set to null or a valid date.
[depending on the type of database engine?]
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Evertjan. Guest
-
William E Hatto #3
Re: Zero length strings
Thanks Evertjan,
I am using an Access Database.
I get an error if I try to insert a zero length string in to the database.
Is there something I am missing?
I have got around it so far using the code in my OP.
Is threr a better way?
Cheers, Bill.
"Evertjan." <exjxw.hannivoort@interxnl.net> wrote in message
news:Xns9507975A5B5A6eejj99@194.109.133.29...> William E Hatto wrote on 13 jun 2004 in
> microsoft.public.inetserver.asp.db:
>>> > What is the best way to handle zero length variables when inserting
> > data into a table. I have text field and date fields, both of which
> > have no data in them from time to time.
> >
> > I have been using this for the text fields.
> >
> > If myData="" then myData=" "
> >
> > I have used the same for dates.
> >
> > Is this OK to use or is there a better way.
> >
> A string text field can have an empty string
>
> A date field must be set to null or a valid date.
>
> [depending on the type of database engine?]
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)
William E Hatto Guest
-
Bob Barrows [MVP] #4
Re: Zero length strings
For Jet database Text fields, there as an Access-defined property called
"Allow zero-length string" which you need to set in the table design view in
Access.
For Date/Time fields, you have to insert a Null, not a string.
Bob Barrows
William E Hatto wrote:--> Thanks Evertjan,
>
> I am using an Access Database.
> I get an error if I try to insert a zero length string in to the
> database. Is there something I am missing?
>
> I have got around it so far using the code in my OP.
>
> Is threr a better way?
>
> Cheers, Bill.
>
>
> "Evertjan." <exjxw.hannivoort@interxnl.net> wrote in message
> news:Xns9507975A5B5A6eejj99@194.109.133.29...>> William E Hatto wrote on 13 jun 2004 in
>> microsoft.public.inetserver.asp.db:
>>>>>>> What is the best way to handle zero length variables when inserting
>>> data into a table. I have text field and date fields, both of which
>>> have no data in them from time to time.
>>>
>>> I have been using this for the text fields.
>>>
>>> If myData="" then myData=" "
>>>
>>> I have used the same for dates.
>>>
>>> Is this OK to use or is there a better way.
>>>
>> A string text field can have an empty string
>>
>> A date field must be set to null or a valid date.
>>
>> [depending on the type of database engine?]
>>
>> --
>> Evertjan.
>> The Netherlands.
>> (Please change the x'es to dots in my emailaddress)
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"
Bob Barrows [MVP] Guest
-
William E Hatto #5
Re: Zero length strings
Thankyou....
"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:eTP5H2UUEHA.3540@TK2MSFTNGP11.phx.gbl...in> For Jet database Text fields, there as an Access-defined property called
> "Allow zero-length string" which you need to set in the table design view> Access.
>
> For Date/Time fields, you have to insert a Null, not a string.
>
> Bob Barrows
>
> William E Hatto wrote:>> > Thanks Evertjan,
> >
> > I am using an Access Database.
> > I get an error if I try to insert a zero length string in to the
> > database. Is there something I am missing?
> >
> > I have got around it so far using the code in my OP.
> >
> > Is threr a better way?
> >
> > Cheers, Bill.
> >
> >
> > "Evertjan." <exjxw.hannivoort@interxnl.net> wrote in message
> > news:Xns9507975A5B5A6eejj99@194.109.133.29...> >> William E Hatto wrote on 13 jun 2004 in
> >> microsoft.public.inetserver.asp.db:
> >>
> >>> What is the best way to handle zero length variables when inserting
> >>> data into a table. I have text field and date fields, both of which
> >>> have no data in them from time to time.
> >>>
> >>> I have been using this for the text fields.
> >>>
> >>> If myData="" then myData=" "
> >>>
> >>> I have used the same for dates.
> >>>
> >>> Is this OK to use or is there a better way.
> >>>
> >>
> >> A string text field can have an empty string
> >>
> >> A date field must be set to null or a valid date.
> >>
> >> [depending on the type of database engine?]
> >>
> >> --
> >> Evertjan.
> >> The Netherlands.
> >> (Please change the x'es to dots in my emailaddress)
> --
> 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"
>
>
William E Hatto Guest



Reply With Quote

