[thelist] MS Access to SQL Server: METAFILE Images (LONG!)

Eric Stanton eric at electronhosting.com
Fri Sep 28 16:34:16 CDT 2001


Janet,
try removing the Quotes from (Date_of _Issue) VB might see you variable as a
constant with the quotations that would cause it to throw you the type
mismatch error.
sting667d
----- Original Message -----
From: darren <darren at web-bitch.co.uk>
To: Janet Nabring-Stager <thelist at lists.evolt.org>
Sent: Friday, September 28, 2001 8:36 AM
Subject: Re[2]: [thelist] MS Access to SQL Server: METAFILE Images (LONG!)


> On 28 September 2001 at 16:05:53, Janet Nabring-Stager
<jnabring at yahoo.com> wrote:
>
> JNS> You all are great :)
> JNS> But sadly, it's still not working :(
>
> JNS> I also tried:  <% Do While Not rs.EOF %> <option value="<%=
> JNS> FormatDateTime(rs("Date_of_Issue"),vbLongDate) %>">
>
> this should be the correct format...as long as you have the correct value
> for vbLongDate (it should be = 1).
>
> JNS> This threw MS VBScript runtime error '800a000d' Type
> JNS> Mismatch:'FormatDateTime'/search.asp, line 177
>
> hmmm...i can't remember the original post, but you're certain that all
> the values coming back are valid dates??
>
> and you might want to try:
>
>    Do While Not rs.EOF
>       Response.Write "<option value=""" & rs("Date_of_Issue") & """>" & _
>          FormatDateTime(rs("Date_of_Issue"), vbLongDate) & "</option>"
>
> or maybe you need to convert the value to a date....
>
>       Response.Write "<option value=""" & rs("Date_of_Issue") & """>" & _
>          FormatDateTime(CDate(rs("Date_of_Issue")), vbLongDate) & _
>          "</option>"
>
>
> to give you the formatted date in the dropdown and the unformatted
> version it's value.  it could make things a lot easier if you use the
> date to requery the db.
>
> JNS> <!-- #INCLUDE file = "adovbs.inc" -->
> JNS> <!-- METADATA TYPE="typelib"
> JNS>                 FILE="C:\Program Files\Common
Files\System\ado\msado15.dll" -->
>
> both of these include the same constants hence the error.  use one or the
> other, not both.
>
> does anyone know if there is any advantage to using the metadata??
> personally i use a severely chopped down adovbs.inc...
>
> hth,
>
> darren.
>
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
>






More information about the thelist mailing list