How to dereferencing ADODB on server?

How to dereferencing ADODB on server?

am 15.06.2005 12:10:48 von axel

Hi,

Visual Interdev 6.0 has a handy function of autofilling parameters
(e.g. Command.CreatParameter(sTxt, adVarChar <= etc. ))

The IIServer does not seem to understand these, I need to replace them
with numberals or define them myself like

dim adVarChar
adVarChar = 200

is there any way this process can be automated (like a #include in C++
or some other way to reference them (e.g. ADODB.collection.adVarChar or
whatever?) - and if so, can I put that into global.asa?

Sorry if the question sounds silly I am a ASP newbie thrown into the
deep end without much (well actually any) training. I have the MSDN
collection (Jan1999 and April2005) would also be grateful for pointers
to a chapter to read there.

tia
Axel

Re: How to dereferencing ADODB on server?

am 15.06.2005 12:48:08 von reb01501

Axel wrote:
> Hi,
>
> Visual Interdev 6.0 has a handy function of autofilling parameters
> (e.g. Command.CreatParameter(sTxt, adVarChar <= etc. ))
>
> The IIServer does not seem to understand these, I need to replace them
> with numberals or define them myself like
>
> dim adVarChar
> adVarChar = 200
>
> is there any way this process can be automated (like a #include in C++
> or some other way to reference them (e.g. ADODB.collection.adVarChar
> or whatever?) - and if so, can I put that into global.asa?
>
> Sorry if the question sounds silly I am a ASP newbie thrown into the
> deep end without much (well actually any) training. I have the MSDN
> collection (Jan1999 and April2005) would also be grateful for pointers
> to a chapter to read there.
>
MS provides a #include file for this purpose called adovbs.inc. It is
installed on your computer in ..\Program Files\Common Files\System\ADO when
you install MDAC. However, using it is not the best way to get access to the
constants:
http://www.aspfaq.com/show.asp?id=2112

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: How to dereferencing ADODB on server?

am 15.06.2005 14:42:11 von axel

Thanks Bob for the valuable advice. For readability sake I went with a
(slimmed down) version of the adovbs.inc; I included it on my search
page, as in:

it works quite well, thanks again.

rgds
Axel

Re: How to dereferencing ADODB on server?

am 15.06.2005 19:57:27 von Adrienne

Gazing into my crystal ball I observed "Axel"
writing in news:1118839331.927304.69540@o13g2000cwo.googlegroups.com:

> Thanks Bob for the valuable advice. For readability sake I went with a
> (slimmed down) version of the adovbs.inc; I included it on my search
> page, as in:
> it works quite well, thanks
> again.
>
> rgds
> Axel
>
>

If I were you I would rename it to adovbs_short.asp. Files with the INC
extension can be called up in a browser as text files.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Re: How to dereferencing ADODB on server?

am 21.06.2005 12:37:23 von axel

Adrienne I just did this - then all the code turns yellow in my MS
Visual Interdev; here are the first 3 lines:

<%
'----------------------------------------------------------- ---------
' Microsoft ADO

apart from looking ugly, is there any significance to this?

tia
Axel

Re: How to dereferencing ADODB on server?

am 21.06.2005 13:02:09 von reb01501

Axel wrote:
> Adrienne I just did this - then all the code turns yellow in my MS
> Visual Interdev; here are the first 3 lines:
>
> <%
> '----------------------------------------------------------- ---------
> ' Microsoft ADO
>
> apart from looking ugly, is there any significance to this?
>

When that hapens to me, I simply close and reopen the file and the
formatting goes back to normal. If not, then there is a mistake in the file.
You say these are the first 3 lines - what file are they the first 3 lines
of? The include file? I would have to assume so since there is no #include
line here.

If the formatting does not clear itself up, start by deleteing everything
but the beginning and ending server-script tags (<% ... %>) from the file
and start adding stuff back in until you cause the formatting to screw up
again.

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: How to dereferencing ADODB on server?

am 22.06.2005 11:42:00 von realraven2000

yes the include file, just by renaming from inc to asp - according to
Adrienne's tip. does this need a different syntax? It is not important
for the ADODB definitions but if I am to store the connection string in
a session variable in order to hide it and avoid the connection object
itself as session variable then it might become necessary to include
ASP files.

Re: How to dereferencing ADODB on server?

am 22.06.2005 14:54:44 von reb01501

Axel wrote:
> yes the include file, just by renaming from inc to asp - according to
> Adrienne's tip. does this need a different syntax? It is not important
> for the ADODB definitions but if I am to store the connection string
> in a session variable in order to hide it and avoid the connection
> object itself as session variable then it might become necessary to
> include ASP files.

I cannot reproduce your problem. If you go to the Interdev Support Center
and search for formatting problems, you should find a solution.

http://support.microsoft.com/ph/3022

Oh, never mind, I was curious and did a search myself, coming up with:
http://support.microsoft.com/default.aspx?scid=kb;en-us;1951 84
and, probably better, this:
http://support.microsoft.com/kb/270656/EN-US/


Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.