<HTML><HEAD>
<META content="text/html charset=windows-1252" http-equiv=Content-Type></HEAD>
<BODY
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"
dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>Thanks for the help Joseph,</DIV>
<DIV> </DIV>
<DIV>I changed my array from type string to object and it seems to be working
now. I’m not sure if that is the best approach to parameters with .net or
not.</DIV>
<DIV>It may come back to bite me.</DIV>
<DIV> </DIV>
<DIV>Thanks for all the help. I was able to set the date format and separator as
you have it below with .net, but it didn’t help.</DIV>
<DIV>It’s handy to know that those database properties can be set in code.</DIV>
<DIV> </DIV>
<DIV>Thanks for all the info. I’m a frequent Xojo user also.</DIV>
<DIV> </DIV>
<DIV>Johnny</DIV>
<DIV
style="FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: inline">
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=joseph@checkos.com
href="mailto:joseph@checkos.com">Joseph Morgan</A> </DIV>
<DIV><B>Sent:</B> Saturday, October 12, 2013 6:10 PM</DIV>
<DIV><B>To:</B> <A title=valentina@lists.macserve.net
href="mailto:valentina@lists.macserve.net">Valentina Developers</A> </DIV>
<DIV><B>Subject:</B> Re: SQL Insert Date</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: inline">I
should add that there is another way to open Vdatabase in Xojo
<DIV> </DIV>
<DIV>the method to setup the db for the second way to access the db looks like
this:</DIV>
<DIV> </DIV>
<DIV>
<DIV> VDatabase.DateFormat = EVDateFormat.kMDY</DIV>
<DIV> mVDatabase.DateSep = "-"</DIV>
<DIV> mVDatabase.TimeSep = ":"</DIV>
<DIV> </DIV>
<DIV>Joseph</DIV>
<DIV> </DIV>
<DIV>
<DIV> </DIV>
<DIV>
<DIV>On Oct 12, 2013, at 6:08 PM, Joseph Morgan <<A
href="mailto:joseph@checkos.com">joseph@checkos.com</A>> wrote:</DIV><BR
class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
<DIV
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">
<DIV>After looking at my set-up I set up the database right after opening it
(not necessarily after connecting to the server which happens earlier). Sorry
I don't know how exactly the opening of the db happens in .net</DIV>
<DIV> </DIV>
<DIV>I have a variable "mVdatabase" after opening the next line is my setup
method "SetupVDB" </DIV>
<DIV> </DIV>
<DIV>
<DIV>mVDatabase.Open( f )</DIV>
<DIV>SetupVDB//we can do any initial setups on the database before we use
it</DIV></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>the setup method has the following lines of code:</DIV>
<DIV> </DIV>
<DIV>
<DIV>dim setupstring as String = "SET PROPERTY
DateTimeFormat,DateSeparator,TimeSeparator OF DATABASE TO
'kYMD','-',':';"</DIV>
<DIV>mVRBdatabase.SQLExecute(setupstring)</DIV>
<DIV>mVRBdatabase.Commit</DIV></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>if you search for "kYMD" on the wiki you should find the other constants
that are for other formats.</DIV>
<DIV> </DIV>
<DIV>Any time I have a field that uses a date in XOJO, I submit it as a string
so it's likely to work similarly in .net</DIV>
<DIV> </DIV>
<DIV>I hope this helps you!</DIV>
<DIV>Joseph</DIV>
<DIV> </DIV>
<DIV>
<DIV> </DIV>
<DIV>
<DIV>On Oct 12, 2013, at 5:39 PM, "Johnny Harris" <<A
href="mailto:johnny@southshore.com">johnny@southshore.com</A>>
wrote:</DIV><BR class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
<DIV dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: calibri">
<DIV>Hi Joseph,</DIV>
<DIV> </DIV>
<DIV>I found in the docs:</DIV>
<DIV><BR>SET PROPERTY DateTimeFormat and Set Property DateSeparator</DIV>
<DIV> </DIV>
<DIV>I tried executing both queries just after connecting and still get the
same results.</DIV>
<DIV> </DIV>
<DIV>Is that what you were referring to? If not maybe an example of your
setup string would help.</DIV>
<DIV> </DIV>
<DIV>It seems to me that the date value I’m trying to insert using
parameters is being converted to a string type when I add</DIV>
<DIV>it to the parameters array, which is a string array. I’m guessing since
the database is receiving it as a string it thinks it is invalid.</DIV>
<DIV> </DIV>
<DIV>I may be way off base also.</DIV>
<DIV> </DIV>
<DIV>Thanks For Helping.</DIV>
<DIV> </DIV>
<DIV>Johnny</DIV>
<DIV
style="FONT-SIZE: small; FONT-FAMILY: calibri; FONT-WEIGHT: normal; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: inline">
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=joseph@checkos.com
href="mailto:joseph@checkos.com">Joseph Morgan</A> </DIV>
<DIV><B>Sent:</B> Saturday, October 12, 2013 5:13 PM</DIV>
<DIV><B>To:</B> <A title=valentina@lists.macserve.net
href="mailto:valentina@lists.macserve.net">Valentina Developers</A> </DIV>
<DIV><B>Subject:</B> Re: SQL Insert Date</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-SIZE: small; FONT-FAMILY: calibri; FONT-WEIGHT: normal; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: inline">
<DIV>It's been my experience that each time you open/connect to vserver, you
have to set up date format. I send an SQL execute right after connect that
tells the server to use the correct date format. Let me know if you need me
to send you the setup string that I use. </DIV>
<DIV> </DIV>
<DIV>Joseph </DIV>
<DIV><BR>On Oct 12, 2013, at 5:08 PM, "Johnny Harris" <<A
href="mailto:johnny@southshore.com">johnny@southshore.com</A>>
wrote:<BR><BR></DIV>
<BLOCKQUOTE type="cite">
<DIV>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: calibri">
<DIV>Update...</DIV>
<DIV> </DIV>
<DIV>I just tried the same query without parameter binding and it worked
OK.</DIV>
<DIV> </DIV>
<DIV>So I guess my question now is how to insert into a date field using
parameter binding?</DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV>Johnny Harris</DIV>
<DIV
style="FONT-SIZE: small; FONT-FAMILY: calibri; FONT-WEIGHT: normal; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: inline">
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=johnny@southshore.com
href="mailto:johnny@southshore.com">Johnny Harris</A> </DIV>
<DIV><B>Sent:</B> Saturday, October 12, 2013 5:05 PM</DIV>
<DIV><B>To:</B> <A title=valentina@lists.macserve.net
href="mailto:valentina@lists.macserve.net">Valentina Developers</A> </DIV>
<DIV><B>Subject:</B> SQL Insert Date</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-SIZE: small; FONT-FAMILY: calibri; FONT-WEIGHT: normal; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: inline">
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: calibri">
<DIV>Hello everyone,</DIV>
<DIV> </DIV>
<DIV>I’m trying to insert a record and one of the fields is a date
field.</DIV>
<DIV> </DIV>
<DIV>I get the following error message:</DIV>
<DIV> </DIV>
<DIV>Date Value “10/12/2013” is invalid. Illegal symbol at “-1”
position."</DIV>
<DIV> </DIV>
<DIV>Would anyone happen to have any pointers for inserting dates?</DIV>
<DIV>I’m guessing the field is in the wrong format but the format
for</DIV>
<DIV>the database is set to “MMDDYYYY” and the separator is “/”.</DIV>
<DIV> </DIV>
<DIV>I’m using .net and parameter binding.</DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV>Johnny Harris</DIV></DIV></DIV>
<HR>
_______________________________________________<BR>Valentina mailing
list<BR><A
href="mailto:Valentina@lists.macserve.net">Valentina@lists.macserve.net</A><BR><A
href="http://lists.macserve.net/mailman/listinfo/valentina">http://lists.macserve.net/mailman/listinfo/valentina</A><BR></DIV></DIV></DIV></DIV></BLOCKQUOTE>
<BLOCKQUOTE type="cite">
<DIV><SPAN>_______________________________________________</SPAN><BR><SPAN>Valentina
mailing list</SPAN><BR><SPAN><A
href="mailto:Valentina@lists.macserve.net">Valentina@lists.macserve.net</A></SPAN><BR><SPAN><A
href="http://lists.macserve.net/mailman/listinfo/valentina">http://lists.macserve.net/mailman/listinfo/valentina</A></SPAN><BR></DIV></BLOCKQUOTE>
<DIV> </DIV>
<HR>
_______________________________________________<BR>Valentina mailing
list<BR><A
href="mailto:Valentina@lists.macserve.net">Valentina@lists.macserve.net</A><BR><A
href="http://lists.macserve.net/mailman/listinfo/valentina">http://lists.macserve.net/mailman/listinfo/valentina</A><BR></DIV></DIV></DIV></DIV>_______________________________________________<BR>Valentina
mailing list<BR><A
href="mailto:Valentina@lists.macserve.net">Valentina@lists.macserve.net</A><BR><A
href="http://lists.macserve.net/mailman/listinfo/valentina">http://lists.macserve.net/mailman/listinfo/valentina</A><BR></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV></DIV>_______________________________________________<BR>Valentina
mailing list<BR><A
href="mailto:Valentina@lists.macserve.net">Valentina@lists.macserve.net</A><BR>http://lists.macserve.net/mailman/listinfo/valentina<BR></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV></DIV>
<P>
<HR>
_______________________________________________<BR>Valentina mailing
list<BR>Valentina@lists.macserve.net<BR>http://lists.macserve.net/mailman/listinfo/valentina<BR></DIV></DIV></DIV></BODY></HTML>