[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Jaez

3/20/2007 9:58:00 AM

Moving from VB6 and now a newbie with VB in Visual studio and SQL 2005
please can you help with 2 questions?

First
--------------------
I have a database and a webpage with a table view linked to a formview to
select and display a selected record. This works fine.

I would like to be able to display the number of times a particular record
is viewed ie a database record hit counter.

Is there an easy way of incrementing a value with SQL code or do I need to
make routines to select - store value - increment - then update?

There must be a way to do this in one go.

Second
----------------------

I would like to add a button to a webpage to return the user to the page
they came from ( ie like back button in IE ) even if its not from one of my
pages. I gather there is a history collection but I have failed in trying to
access it.



Thanks

jaez



3 Answers

Andrew J. Kelly

3/20/2007 2:07:00 PM

0

The best way for #1 is to call a stored procedure that does the select and
increments the counter. As for #2 I suggest you ask in the proper newsgroup
for the language you are using.

--
Andrew J. Kelly SQL MVP

"Jaez" <jaezms@ntlworld.com> wrote in message
news:leOLh.12492$GI.3692@newsfe2-gui.ntli.net...
> Moving from VB6 and now a newbie with VB in Visual studio and SQL 2005
> please can you help with 2 questions?
>
> First
> --------------------
> I have a database and a webpage with a table view linked to a formview to
> select and display a selected record. This works fine.
>
> I would like to be able to display the number of times a particular record
> is viewed ie a database record hit counter.
>
> Is there an easy way of incrementing a value with SQL code or do I need to
> make routines to select - store value - increment - then update?
>
> There must be a way to do this in one go.
>
> Second
> ----------------------
>
> I would like to add a button to a webpage to return the user to the page
> they came from ( ie like back button in IE ) even if its not from one of
> my
> pages. I gather there is a history collection but I have failed in trying
> to
> access it.
>
>
>
> Thanks
>
> jaez
>
>
>


tirebiter

2/7/2013 3:10:00 PM

0

Jason@nospam.com (Jason) wrote in
news:Jason-0602132338510001@66-53-219-233.lsan.mdsg-pacwest.com:

> In article
> <782267e3-d808-4007-9b3c-553cbb1591c8@14g2000vbr.googlegroups.com>,
> Devils Advocaat <mankygoat7@gmail.com> wrote:
>
>> On 7 Feb, 00:05, Ja...@nospam.com (Jason) wrote:
>> > In article
>> > <31b463dd-df47-482d-adf0-3d5ee90d8...
@dp10g2000vbb.googlegroups.com>
>> > ,
>> >
>> > Devils Advocaat <mankygo...@gmail.com> wrote:
>> > > On 6 Feb, 22:52, Ja...@nospam.com (Jason) wrote:
>> > > > In article
>> > > > <adada5a3-c52e-4f07-b12c-6b0e01555...
@y9g2000vbb.googlegroups.co
>> > > > m>, D=
>> evil=3D
>> > > s
>> >
>> > > > Advocaat <mankygo...@gmail.com> wrote:
>> > > > > On 5 Feb, 23:33, Ja...@nospam.com (Jason) wrote:
>> > > > > > In article
>> > > > > > <75dd2aa1-f315-4b7c-bd08-b8ee753ad...
@g8g2000vbf.googlegroup
>> > > > > > s.com=
>> >, D=3D
>> > > evil=3D3D
>> > > > > s
>> >
>> > > > > > Advocaat <mankygo...@gmail.com> wrote:
>> > > > > > > On 5 Feb, 22:36, Ja...@nospam.com (Jason) wrote:
>> > > > > > > > In article
>> > > > > > > > <092d4b0d-be63-403e-be2a-0b5dbb235...
@z4g2000vbz.googleg
>> > > > > > > > roups=
>> .com=3D
>> > > >, D=3D3D
>> > > > > evil=3D3D3D
>> > > > > > > s
>> >
>> > > > > > > > Advocaat <mankygo...@gmail.com> wrote:
>> > > > > > > > > On 5 Feb, 16:41, Ja...@nospam.com (Jason) wrote:
>> > > > > > > > > > In article
>> > > > > > > > > > <f832749b-1ce1-4872-bd4a-cce537435...
@e10g2000vbv.go
>> > > > > > > > > > ogleg=
>> roup=3D
>> > > s.co=3D3D
>> > > > > m>,
>> >
>> > > > > > > > > > Devils Advocaat <mankygo...@gmail.com> wrote:
>> > > > > > > > > > > On 5 Feb, 05:06, Ja...@nospam.com (Jason) wrote:
>> > > > > > > > > > > > In article
>> > > > > > > > > > > > <1c811ngn1v3qh.e692n8h4z8xx$....@40tude.ne=
>> t>,
>> >
>> > > > > > > > > > > > ing...@yahoo.co.uk wrote:
>> > > > > > > > > > > > > On Mon, 04 Feb 2013 16:22:08 -0800, Jason
>> > > > > > > > > > > > > wrote:
>> >
>> > > > > > > > > > > > > > In article
>> > > > > > > > > > > > > > <XnsA15DB47A048F8nomailverizon...@216.=
>> 196.=3D
>> > > 121.=3D3D
>> > > > > 131>=3D3D3D
>> > > > > > > , Mi=3D3D3D3D
>> > > > > > > > > tche=3D3D3D3D3D
>> > > > > > > > > > > ll
>> > > > > > > > > > > > > > Holman <nomailverizon.net> wrote:
>> >
>> > > > > > > > > > > > > >> Ja...@nospam.com (Jason) wrote in
>> > > > > > > > > > > > > >>news:Jason-0402131549480001@66.53.221.252:
>> >
>> > > > > > > > > > > > > >>> In article
>> > > > > > > > > > > > > >>> <XnsA15D50AE8F436nomailverizon...@21=
>> 6.19=3D
>> > > 6.12=3D3D
>> > > > > 1.13=3D3D3D
>> > > > > > > 1>,
>> > > > > > > > > > > > > >>> Mitchell Holman <nomailverizon.net>
>> > > > > > > > > > > > > >>> wrote:
>> >
>> > > > > > > > > > > > > >>>> Ja...@nospam.com (Jason) wrote in
>> > > > > > > > > > > > > >>>>news:Jason-0302131838370001@66-53-212-
22.l
>> > > > > > > > > > > > > >>>>san.m=
>> dsg-=3D
>> > > pacw=3D3D
>> > > > > est.=3D3D3D
>> > > > > > > com:
>> >
>> > > > > > > > > > > > > >>>> > In article
>> > > > > > > > > > > > > >>>> <1tn935pgrla1w.xc6rnhzpduto$....@=
>> 40tu=3D
>> > > de.n=3D3D
>> > > > > et>,
>> > > > > > > > > > > > > >>>> > ing...@yahoo.co.uk wrote:
>> >
>> > > > > > > > > > > > > >>>> >> On Sun, 03 Feb 2013 14:52:46 -0800,
>> > > > > > > > > > > > > >>>> Jason w=
>> rote=3D
>> > > :
>> >
>> > > > > > > > > > > > > >>>> >> > In article
>> > > > > > > > > > > > > >>>> <XnsA15C4F4C582Cnomailverizon.=
>> ..@2=3D
>> > > 16.1=3D3D
>> > > > > 96.1=3D3D3D
>> > > > > > > 21.1=3D3D3D3D
>> > > > > > > > > 31>,
>> > > > > > > > > > > > > >>>> >> > Mitchell Holman <nomailverizon.net>
>> > > > > > > > > > > > > >>>> wrote=
>> :
>> >
>> > > > > > > > > > > > > >>>> >> >> =3D3D3D3D3DA0 =3D3D3D3D3DA0If
>> > > > > > > > > > > > > >>>> Sarah Pali=
>> n's doct=3D
>> > > or puts =3D3D
>> > > > > her on X=3D3D3D
>> > > > > > > anax or
>> > > > > > > > > > > > > >>>> >> >> Prosac who is going to take her
>> > > > > > > > > > > > > >>>> guns awa=
>> y?
>> >
>> > > > > > > > > > > > > >>>> >> > That's the problem. Medical records
>> > > > > > > > > > > > > >>>> are c=
>> onfi=3D
>> > > dent=3D3D
>> > > > > ial.
>> >
>> > > > > > > > > > > > > >>>> >> Not entirely so.
>> > > > > > > > > > > > > >>>> >> If a patient presents a clear and
>> > > > > > > > > > > > > >>>> direct da=
>> nger=3D
>> > > =A0to =3D3D
>> > > > > hims=3D3D3D
>> > > > > > > elf =3D3D3D3D
>> > > > > > > > > or
>> > > > > > > > > > > > > >>>> >> others, a doctor is not only
>> > > > > > > > > > > > > >>>> permitted but =
>> requ=3D
>> > > ired=3D3D
>> > > > > =3DA0to =3D3D3D
>> > > > > > > aler=3D3D3D3D
>> > > > > > > > > t th=3D3D3D3D3D
>> > > > > > > > > > > e
>> > > > > > > > > > > > > >>>> >> authorities. =3D3D3D3D3DA0Ditto
>> > > > > > > > > > > > > >>>> communicabl=
>> e dise=3D
>> > > ases: =3D3D
>> > > > > if you=3D3D3D
>> > > > > > > r doct=3D3D3D3D
>> > > > > > > > > or
>> > > > > > > > > > > > > >>>> >> diagnoses you with tuberculosis,
>> > > > > > > > > > > > > >>>> confidenti=
>> alit=3D
>> > > y is=3D3D
>> > > > > =3DA0wai=3D3D3D
>> > > > > > > ved.
>> >
>> > > > > > > > > > > > > >>>> >> Nor would confidentiality be a bar to
>> > > > > > > > > > > > > >>>> makin=
>> g ge=3D
>> > > nera=3D3D
>> > > > > l di=3D3D3D
>> > > > > > > sclo=3D3D3D3D
>> > > > > > > > > sure=3D3D3D3D3D
>> > > > > > > > > > > s.
>> > > > > > > > > > > > > >>>> >> It would be sufficient for a doctor
>> > > > > > > > > > > > > >>>> to make=
>> a g=3D
>> > > ener=3D3D
>> > > > > al a=3D3D3D
>> > > > > > > nd
>> > > > > > > > > > > > > >>>> >> non-specific determination that a
>> > > > > > > > > > > > > >>>> person ha=
>> s a =3D
>> > > cond=3D3D
>> > > > > itio=3D3D3D
>> > > > > > > n or=3D3D3D3D
>> > > > > > > > > =3D3D3DA0is
>> > > > > > > > > > > > > >>>> >> using medication which would disbar
>> > > > > > > > > > > > > >>>> him fro=
>> m gu=3D
>> > > n ow=3D3D
>> > > > > ners=3D3D3D
>> > > > > > > hip =3D3D3D3D
>> > > > > > > > > -- n=3D3D3D3D3D
>> > > > > > > > > > > o
>> > > > > > > > > > > > > >>>> >> specifics need be disclosed.
>> >
>> > > > > > > > > > > > > >>>> > Good point. However, Adam Lanza
>> > > > > > > > > > > > > >>>> (according t=
>> o Do=3D
>> > > ctor=3D3D
>> > > > > =3DA0Jul=3D3D3D
>> > > > > > > ian
>> > > > > > > > > > > > > >>>> > Whitaker) was under psychiatric care
>> > > > > > > > > > > > > >>>> since t=
>> he a=3D
>> > > ge o=3D3D
>> > > > > f 10=3D3D3D
>> > > > > > > =3D3DA0yea=3D3D3D3D
>> > > > > > > > > rs o=3D3D3D3D3D
>> > > > > > > > > > > ld.
>> > > > > > > > > > > > > >>>> > His doctor or doctors never notified
>> > > > > > > > > > > > > >>>> the cop=
>> s th=3D
>> > > at h=3D3D
>> > > > > e wa=3D3D3D
>> > > > > > > s li=3D3D3D3D
>> > > > > > > > > kely=3D3D3D3D3D
>> > > > > > > > > > > =3D3D3D3DA0to
>> > > > > > > > > > > > > >>>> > use a gun or guns to shoot children.
>> >
>> > > > > > > > > > > > > >>>> > The problem is that psychologists can
>> > > > > > > > > > > > > >>>> not us=
>> uall=3D
>> > > y pr=3D3D
>> > > > > edic=3D3D3D
>> > > > > > > t wh=3D3D3D3D
>> > > > > > > > > en
>> > > > > > > > > > > > > >>>> > their psychotic patients may go
>> > > > > > > > > > > > > >>>> postal.
>> >
>> > > > > > > > > > > > > >>>> =3D3D3D3D3DA0 =3D3D3D3D3DA0 So your
>> > > > > > > > > > > > > >>>> background=
>> check f=3D
>> > > or menta=3D3D
>> > > > > l issuse
>> > > > > > > > > > > > > >>>> solution is no solution at all.
>> >
>> > > > > > > > > > > > > >>>> =3D3D3D3D3DA0 =3D3D3D3D3DA0 What
>> > > > > > > > > > > > > >>>> authority doe=
>> s a doct=3D
>> > > or have =3D3D
>> > > > > to order
>> > > > > > > > > > > > > >>>> a patient's home searched and all his
>> > > > > > > > > > > > > >>>> guns sei=
>> zed?
>> >
>> > > > > > > > > > > > > >>> I continue to believe that anyone that
>> > > > > > > > > > > > > >>> has been=
>> a p=3D
>> > > atie=3D3D
>> > > > > nt i=3D3D3D
>> > > > > > > n a =3D3D3D3D
>> > > > > > > > > ment=3D3D3D3D3D
>> > > > > > > > > > > al
>> > > > > > > > > > > > > >>> facility or mental hospital should not be
>> > > > > > > > > > > > > >>> able =
>> to p=3D
>> > > ass =3D3D
>> > > > > a ba=3D3D3D
>> > > > > > > ckgr=3D3D3D3D
>> > > > > > > > > ound
>> > > > > > > > > > > > > >>> check. They have VERY serious mental
>> > > > > > > > > > > > > >>> problems.
>> >
>> > > > > > > > > > > > > >> =3D3D3D3D3DA0 =3D3D3D3D3DA0
>> > > > > > > > > > > > > >> =3D3D3D3D3DA0That wa=
>> sn't the q=3D
>> > > uestion.
>> >
>> > > > > > > > > > > > > >> =3D3D3D3D3DA0 =3D3D3D3D3DA0
>> > > > > > > > > > > > > >> =3D3D3D3D3DA0If a sa=
>> ne gun own=3D
>> > > er becomes=3D3D
>> > > > > =3DA0mentally =3D3D3D
>> > > > > > > ill
>> > > > > > > > > > > > > >> he STILL has his guns. What is your plan
>> > > > > > > > > > > > > >> to disarm mental patients?
>> >
>> > > > > > > > > > > > > > It's complicated. For example, if they have
>> > > > > > > > > > > > > > a dis=
>> orde=3D
>> > > r su=3D3D
>> > > > > ch a=3D3D3D
>> > > > > > > s de=3D3D3D3D
>> > > > > > > > > pres=3D3D3D3D3D
>> > > > > > > > > > > sion,
>> > > > > > > > > > > > > > I don't believe that anything should be
>> > > > > > > > > > > > > > done. It'=
>> s sa=3D
>> > > fe f=3D3D
>> > > > > or s=3D3D3D
>> > > > > > > uch =3D3D3D3D
>> > > > > > > > > peop=3D3D3D3D3D
>> > > > > > > > > > > le to
>> > > > > > > > > > > > > > own guns.
>> >
>> > > > > > > > > > > > > Really? =3D3D3D3D3DA0Depressed mothers have
>> > > > > > > > > > > > > been kn=
>> own to=3D
>> > > =A0kill =3D3D
>> > > > > their
>> > > > > > > > > > > > > children. =3D3D3D3D3DA0Depressed teenagers
>> > > > > > > > > > > > > kill the=
>> mselve=3D
>> > > s all =3D3D
>> > > > > the ti=3D3D3D
>> > > > > > > me ...
>> > > > > > > > > > > > > as do depressed adults.
>> >
>> > > > > > > > > > > > > How safe is that?
>> >
>> > > > > > > > > > > > Millions of people suffer from depression. Are
>> > > > > > > > > > > > you in=
>> fav=3D
>> > > or o=3D3D
>> > > > > f de=3D3D3D
>> > > > > > > nyin=3D3D3D3D
>> > > > > > > > > g
>> > > > > > > > > > > > them the right to own guns?
>> >
>> > > > > > > > > > > They are mentally ill.
>> >
>> > > > > > > > > > > Do you want a mentally ill person to be in
>> > > > > > > > > > > possession o=
>> f a =3D
>> > > gun?
>> >
>> > > > > > > > > > > They could end up shooting others.
>> >
>> > > > > > > > > > > They could end up shooting themselves.
>> >
>> > > > > > > > > > > Not exactly a good situation.
>> >
>> > > > > > > > > > Why do you want the gov't to discriminate against
>> > > > > > > > > > the mil=
>> lion=3D
>> > > s of=3D3D
>> > > > > =3DA0peo=3D3D3D
>> > > > > > > ple
>> > > > > > > > > > that suffer from depression?
>> >
>> > > > > > > > > And you want to allow these people to have access to
>> > > > > > > > > firear=
>> ms?
>> >
>> > > > > > > > > > Thousands of soldiers now in the military
>> > > > > > > > > > suffer from PTSD. Do you want them to go into
>> > > > > > > > > > combat with=
>> out =3D
>> > > carr=3D3D
>> > > > > ying
>> > > > > > > > > > their M-16's?
>> >
>> > > > > > > > > Care to prove that there are military personnel that
>> > > > > > > > > have b=
>> een
>> > > > > > > > > diagnosed with post-traumatic stress disorder who
>> > > > > > > > > actually =
>> are =3D
>> > > stil=3D3D
>> > > > > l
>> > > > > > > > > on active duty with access to military grade
>> > > > > > > > > firearms?
>> >
>> > > > > > > > Do you think they first started suffering from PTSD
>> > > > > > > > only afte=
>> r th=3D
>> > > ey c=3D3D
>> > > > > ame
>> > > > > > > > home from the war? Look in the dictionary and find
>> > > > > > > > compassion=
>> .
>> >
>> > > > > > > You've made the claim, it's down to you to back it up,
>> > > > > > > and whil=
>> e
>> > > > > > > you're at it stop twisting my words.
>> >
>> > > > > > Do I need to find the story about the soldier that went
>> > > > > > postal an=
>> d ki=3D
>> > > lled
>> > > > > > about 20 citizens of Afghanistan? He was later diagnosed
>> > > > > > with PTS=
>> D.
>> >
>> > > > > Jason, you've claimed there are thousands of military
>> > > > > personnel wit=
>> h
>> > > > > post traumatic stress disorder in active service, one story
>> > > > > doesn't support your claim. It looks to me like you'll have
>> > > > > the same troubl=
>> e
>> > > > > proving this as you've had coming up with the video of a
>> > > > > partial bi=
>> rth
>> > > > > abortion.
>> >
>> > > > As you may know, serious disorders like PTSD don't suddenly
>> > > > develop a=
>> fter
>> > > > soldiers come home from combat. They develop slowly while the
>> > > > soldier=
>> s ar=3D
>> > > e
>> > > > still in combat. They may NOT get diagnosed until they come
>> > > > home but =
>> they
>> > > > had it while they were still in combat. I read recently that
>> > > > more sol=
>> dier=3D
>> > > s
>> > > > have died due to suicide than have died in combat. That is
>> > > > probably because they had severe depression or PTSD.
>> >
>> > > >http://www.salon.com/2012/12/10/whos_most_susceptibl...
>> >
>> > > Still you've not supported your claim of thousands of military
>> > > personnel in active service with PTSD. And you've now admitted
>> > > they may not get diagnosed until they return home.
>> >
>> > > Do you even know the effects that this condition can have on
>> > > people? Have you witnessed what they go through even when wide
>> > > awake? =A0I have seen what it can do to people and it's more
>> > > terrifying than seeing shattered limbs, blood and guts hanging
>> > > out of corpses.
>> >
>> > Did you visit the website?
>> >
>> > If you know about PTSD, why ask me about it?
>> >
>> > You appear to know that PTSD begins while military personnel are in
>> > comba=
>> t.
>> >
>> > Are you trying to be argumentative?
>>
>> You still haven't supported your claim about the thousands allegedly
>> still on active service suffering from PTSD.
>>
>> I wasn't asking you about anything you might have read about the
>> condition, and it seems to me that you don't appear to really
>> understand what it is, or what it does.
>>
>> Of course it begins while their in combat situations, those
>> situations are the cause of it.
>>
>> And no I'm not being argumentative, I'm trying to find out what you
>> really know about it.
>>
>> But I reckon from what you're trying to imply about me that you've
>> not got a clue about it.
>
> Thanks for agreeing that PTSD begins while their in combat situations.
>
>

Do you know what PTSD means? How stupid are you really?

---
a.a. #2273

duke

2/7/2013 5:36:00 PM

0

On Wed, 06 Feb 2013 21:16:24 GMT, tirebiter <dontspamme@bigfoot.com> wrote:


>>>> Life's a bitch, then you die. Neither God nor the US Constitution
>>>> guarantees anyone a rose garden.

>>>Pretty crappy monster of a god you worship there.

>> Pretty great of him to give you a chance free to declare yourself -
>> good person or bad person.

>Isn't this alleged god supposed to be omniscient? That would mean that it
>knew everything I would do at the same instant that it supposedly created
>the whole universe?

Yes he does. But you are the weakness. God gives you a chance to overcome your
weakness, and if you don't, suffer the consequences.


The dukester, American - American
********************************************
You can't fix stupid.
********************************************