Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Validate date from VB to insert into Oracle table

Re: Validate date from VB to insert into Oracle table

From: Jim Kennedy <kennedy-down_with_spammers_at_attbi.com>
Date: Fri, 13 Jun 2003 01:51:30 GMT
Message-ID: <C6aGa.967568$Zo.219897@sccrnsc03>


It is this type of programming that gives people the impression that VB programmers are not professional programmers. If you don't know how to do exception handling in VB (or can't read the documentation) then find another profession. (eg flip burgers) People who are going to suceed in this type of industry are people who are somewhat self reliant and can do a little research.

Again in VB dates are a formatted string (and not even done well, since you have to rely on the settings of the client machine - cause vb "programmers" by and large don't understand the difference between something and the formatted representation of something. (yeah some do, but they are the ones where VB is just another language under their belt.) Look in the Oracle docs for to_char and to_date and format masks. Also you might try reading the documentation on whatever driver you are using. Jim

-- 
Replace part of the email address: kennedy-down_with_spammers_at_attbi.com
with family.  Remove the negative part, keep the minus sign.  You can figure
it out.
"Me" <me_at_privacy.net> wrote in message
news:43ehevgs19m9ilrjskbl3o3ehp1jm7nvgc_at_4ax.com...

> On Thu, 12 Jun 2003 12:46:30 GMT, Jim Kennedy wrote:
>
> >Hate "dates" in VB because it is a string and not a real data type. They
> >should have a date data type in VB, but that would be too difficult for
the
> >average VB programmer to understand. (they would get confused about the
> >difference between date and the string representation of a date - happens
in
> >Oracle all the time, with people comparing strings with dates).
>
> Infact I know a few guys who declared the date fields as varchar2 to
> solve the problem! :)
>
> > As to your other question on
> >insert. You need to again add error handling ot your application, trap
the
> >error and display it and not let it propagate upwards and fail.
>
> Yes. But what command can I use to do this. Any idea? A direct insert
> of unexpected values always terminates with an Oracle side error. If I
> can do this I have solved a big problem as I need not validate certain
> inputs from the user, when they can be easily validated from the
> nature/constraint of the attribute in Oracle itself.
>
> Thanks.
Received on Thu Jun 12 2003 - 20:51:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US