[thelist] ASP & Access - Using the same variable twice

Christian Anderson ckanderson at powersurfr.com
Sun Nov 25 04:34:21 CST 2001


Hey Matt,

Thanks, that did the trick.  Ok, now I have one more little baby to ask :)

My server is somewhere in teh USA, and Im in Japan.  I want to have a script
that pulls things out according to the current date, but with the big time
difference, I dont know what I can do.

So in my select statement, do I do a WHERE dDATE = [fn_serverdate](or
whatever that is, I dont really remember) + 14 hours ?

Thanks again!

Christian Anderson
URL: http://www.photokyo.com

----- Original Message -----
From: "Warden, Matt" <mwarden at mattwarden.com>
To: <thelist at lists.evolt.org>
Sent: Sunday, November 25, 2001 1:55 PM
Subject: Re: [thelist] ASP & Access - Using the same variable twice


> On Nov 25, Christian Anderson had something to say about [thelist] ASP
&...
>
> ...
> ><%
> >number = request.querystring("number")
> >SQL=("SELECT * FROM t_kawaguchiko WHERE aID = " & number & ";")
> >set conn = server.createobject("ADODB.Connection")
> >conn.open "photobase"
> >set store=conn.execute(SQL)
> >%>
> >
> >So then I have some variable that I can call with <%= store(1) %> etc...
so
> >if I have
> >
> >My name is: <%= store(1) %>
> >I am whatever years old, bla bla bla bla bla, etc etc
> >on and on and on
> >
> >...dont forget to email me, and dont forget that my name is <%= store(1)
%>
> >!
> >
> >So anyway, I call that <%= store(1) %> thing 2 times, and the second time
I
> >call it, nothing shows up.
>
> Have you closed the recordset?
> Have you called moveNext() or used the recordset in a for each loop?
>
> >What can I do so it will allow me to use the same stuff more than once?
>
> Whatever your problem is, all you have to do is store the resultset value
> into a variant:
>
> ...
> conn.open "photobase"
> set store = conn.execute(SQL)
> strName = store(1)
>
> Response.Write "My name is:" & strName
> ...
> Response.Write "... forget that my name is" & strName
>
>
> hope this helps. if you want to know exactly what you did wrong, post more
> of your script and i or someone else will help you out so you don't make
> the same mistake next time.
>
>
> --
> mattwarden
> mattwarden.com
>
>
> ---------------------------------------
> 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