473,473 Members | 4,257 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

implicit connections

i am maintaining a system that was developed using dream weaver. a lot
of the asp ado code looks like this:

set sp_yellow = Server.CreateObject("ADODB.Command")
sp_yellow.ActiveConnection = MM_MHR_CONN_STR_STRING
sp_yellow.CommandText = "Sp_HPMSQ007_GetSystemConstants"
sp_yellow.CommandType = 4
sp_yellow.CommandTimeout = 0
sp_yellow.Prepared = true
sp_yellow.Parameters.Append
sp_yellow.CreateParameter("@RETURN_VALUE", 3, 4)
sp_yellow.Parameters.Append sp_yellow.CreateParameter("@P_NAME_TXT",
129, 1, 17, "MLSTN_YELLOW_DAYS")
set rst_yellow = sp_yellow.Execute

someone on another forum expressed that dreamweaver "tends to drive
the programmer to creat implicit connections and their effect on
performance".

could someone explain this to me? a provide some better code? (we no
longer are required to use dream weaver to develop code for the app).

thanks in advance.
Jun 27 '08 #1
5 1704
ro***********@shaw.ca wrote:
i am maintaining a system that was developed using dream weaver. a lot
of the asp ado code looks like this:

set sp_yellow = Server.CreateObject("ADODB.Command")
sp_yellow.ActiveConnection = MM_MHR_CONN_STR_STRING
sp_yellow.CommandText = "Sp_HPMSQ007_GetSystemConstants"
Here is another problem: it is a bad idea to use the "sp_" prefix for
user-defined stored procedures. SQL Server assumes that procedures with
that prefix are system procedures, and will waste time looking for them
in the Master database, even if you specify the database name
explicitly. If you make the double mistake of giving your procedure the
same name as an actual system procedure, guess which one will be run
when you call it.
sp_yellow.CommandType = 4
sp_yellow.CommandTimeout = 0
sp_yellow.Prepared = true
sp_yellow.Parameters.Append
sp_yellow.CreateParameter("@RETURN_VALUE", 3, 4)
sp_yellow.Parameters.Append sp_yellow.CreateParameter("@P_NAME_TXT",
129, 1, 17, "MLSTN_YELLOW_DAYS")
set rst_yellow = sp_yellow.Execute
If you are not interested in the return value, using an explicit Command
object and appending the parameter objects is overkill.
>
someone on another forum expressed that dreamweaver "tends to drive
the programmer to creat implicit connections and their effect on
performance".

could someone explain this to me? a provide some better code? (we no
longer are required to use dream weaver to develop code for the app).
Explicit connections are best. Like this:

Set cn = CreateObject("ADODB.Connection")
cn.Open MM_MHR_CONN_STR_STRING 'ughhh
set rst_yellow = CreateObject("ADODB.Recordset")
'ugh - damn long variable names! let's fix this one
dim days
days = MLSTN_YELLOW_DAYS
cn.Sp_HPMSQ007_GetSystemConstants days, rst_yellow
If not rst_yellow.eof then
etc.

--
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.
Jun 27 '08 #2
On 22 May, 10:14, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
wrote:
rocketboy2...@shaw.ca wrote:
i am maintaining a system that was developed using dream weaver. a lot
of the asp ado code looks like this:
* set sp_yellow = Server.CreateObject("ADODB.Command")
* sp_yellow.ActiveConnection = MM_MHR_CONN_STR_STRING
* sp_yellow.CommandText = "Sp_HPMSQ007_GetSystemConstants"

Here is another problem: it is a bad idea to use the "sp_" prefix for
user-defined stored procedures. SQL Server assumes that procedures with
that prefix are system procedures, and will waste time looking for them
in the Master database, even if you specify the database name
explicitly. If you make the double mistake of giving your procedure the
same name as an actual system procedure, guess which one will be run
when you call it.
* sp_yellow.CommandType = 4
* sp_yellow.CommandTimeout = 0
* sp_yellow.Prepared = true
* sp_yellow.Parameters.Append
sp_yellow.CreateParameter("@RETURN_VALUE", 3, 4)
* sp_yellow.Parameters.Append sp_yellow.CreateParameter("@P_NAME_TXT",
129, 1, 17, "MLSTN_YELLOW_DAYS")
* set rst_yellow = sp_yellow.Execute

If you are not interested in the return value, using an explicit Command
object and appending the parameter objects is overkill.
someone on another forum expressed that dreamweaver "tends to drive
the programmer to creat implicit connections and their effect on
performance".
could someone explain this to me? a provide some better code? (we no
longer are required to use dream weaver to develop code for the app).

Explicit connections are best. Like this:

Set cn = CreateObject("ADODB.Connection")
cn.Open MM_MHR_CONN_STR_STRING 'ughhh
set rst_yellow = CreateObject("ADODB.Recordset")
'ugh - damn long variable names! let's fix this one
dim days
days = MLSTN_YELLOW_DAYS
cn.Sp_HPMSQ007_GetSystemConstants days, rst_yellow
If not rst_yellow.eof then
etc.

--
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.

awsome, thanks for the advice. i'm curious though...

the procedure i am calling actually has three parameters... two of
them have defaults. how do i use the names of the parameters in the
method that you outlined? and checking for an error condition
returned?

thanks again!
Jun 27 '08 #3

<ro***********@shaw.cawrote in message
news:71**********************************@x1g2000p rh.googlegroups.com...
On 22 May, 10:14, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
wrote:
rocketboy2...@shaw.ca wrote:
i am maintaining a system that was developed using dream weaver. a lot
of the asp ado code looks like this:
set sp_yellow = Server.CreateObject("ADODB.Command")
sp_yellow.ActiveConnection = MM_MHR_CONN_STR_STRING
sp_yellow.CommandText = "Sp_HPMSQ007_GetSystemConstants"

Here is another problem: it is a bad idea to use the "sp_" prefix for
user-defined stored procedures. SQL Server assumes that procedures with
that prefix are system procedures, and will waste time looking for them
in the Master database, even if you specify the database name
explicitly. If you make the double mistake of giving your procedure the
same name as an actual system procedure, guess which one will be run
when you call it.
sp_yellow.CommandType = 4
sp_yellow.CommandTimeout = 0
sp_yellow.Prepared = true
sp_yellow.Parameters.Append
sp_yellow.CreateParameter("@RETURN_VALUE", 3, 4)
sp_yellow.Parameters.Append sp_yellow.CreateParameter("@P_NAME_TXT",
129, 1, 17, "MLSTN_YELLOW_DAYS")
set rst_yellow = sp_yellow.Execute

If you are not interested in the return value, using an explicit Command
object and appending the parameter objects is overkill.
someone on another forum expressed that dreamweaver "tends to drive
the programmer to creat implicit connections and their effect on
performance".
could someone explain this to me? a provide some better code? (we no
longer are required to use dream weaver to develop code for the app).

Explicit connections are best. Like this:

Set cn = CreateObject("ADODB.Connection")
cn.Open MM_MHR_CONN_STR_STRING 'ughhh
set rst_yellow = CreateObject("ADODB.Recordset")
'ugh - damn long variable names! let's fix this one
LOL. I forgot to forewarn you when I directed you here of some people's
(Bob's) revulsion twoards the auto-generated variable names that DW
produces...

(and completely overlooked the procedure name beginning with sp_ ...)

And here's another Thread where Bob discusses explicit v. implicit
connections in more detail:
http://groups.google.co.uk/group/mic...ed8b78c7fc0150

--
Mike Brind
Microsoft MVP - ASP/ASP.NET
Jun 27 '08 #4
Mike Brind [MVP] wrote:
>
LOL. I forgot to forewarn you when I directed you here of some
people's (Bob's) revulsion twoards the auto-generated variable names
that DW produces...
LOL ... and I forgot to insert some smileys to make sure everyone realized I
was partially joking
>
(and completely overlooked the procedure name beginning with sp_ ...)

And here's another Thread where Bob discusses explicit v. implicit
connections in more detail:
http://groups.google.co.uk/group/mic...ed8b78c7fc0150
Thanks Mike, I hadn't had time to find that being at work and all ...

Congratulations on the MVP award ... I haven't seen you in the private
groups. Still finding your way around?
--
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"
Jun 27 '08 #5

"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcomwrote in message
news:uP**************@TK2MSFTNGP06.phx.gbl...
Mike Brind [MVP] wrote:
>>
LOL. I forgot to forewarn you when I directed you here of some
people's (Bob's) revulsion twoards the auto-generated variable names
that DW produces...

LOL ... and I forgot to insert some smileys to make sure everyone realized
I was partially joking
>>
(and completely overlooked the procedure name beginning with sp_ ...)

And here's another Thread where Bob discusses explicit v. implicit
connections in more detail:
http://groups.google.co.uk/group/mic...ed8b78c7fc0150

Thanks Mike, I hadn't had time to find that being at work and all ...

Congratulations on the MVP award ... I haven't seen you in the private
groups. Still finding your way around?
Thanks. I've found the groups, but not really spent any time there.
Spending way too much time over at forums.asp.net, basically :-)

Mike
Jun 27 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mudge | last post by:
Hi, My hosting provider only allows me to use 50 connections to my MySQL database that my Web site will use. I don't know what this 50 connections means exactly. Does this mean that only 50...
3
by: Reneé | last post by:
I wanted to know the order of implicit conversions and which sort of values allow them. From searching around in books and the archive of this mailing list, it seems to be that only numbers are...
10
by: Mark J. McGinty | last post by:
As I was working on a project, I noticed something interesting about use of statements such as: dim cn, rs ' variants Set cn = New ADODB.Connection Set rs = New ADODB.Recordset 'cn.Open...
11
by: Steve Gough | last post by:
Could anyone please help me to understand what is happening here? The commented line produces an error, which is what I expected given that there is no conversion defined from type double to type...
9
by: Girish | last post by:
Im trying to understand implicit type conversions from object -> string and vice versa. I have two classes, one Driver and one called StringWrapper. These are just test classes that try and...
11
by: Aaron Queenan | last post by:
Given the classes: class Class { public static implicit operator int(Class c) { return 0; } } class Holder
36
by: Chad Z. Hower aka Kudzu | last post by:
I have an implicit conversion set up in an assembly from a Stream to something else. In C#, it works. In VB it does not. Does VB support implicit conversions? And if so any idea why it would work...
3
by: SharpCoderMP | last post by:
hi, i've found out here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=131195&SiteID=1 that FtpWebRequest does not support implicit connections. I have a serious problem with that,...
17
by: arindam.mukerjee | last post by:
I was running code like: #include <stdio.h> int main() { printf("%f\n", 9/5); return 0; }
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.