473,574 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Non-ADO?

PW

If I am using ASP and access an Access database, but I am not using ADO,
what is the name of the database methodology I am using ?

May 29 '06 #1
10 1355
What about showing us some code ?
--
Patrice

"PW" <pw***@SPAMbigp ond.net.au> a écrit dans le message de news:
uL************* *@TK2MSFTNGP04. phx.gbl...

If I am using ASP and access an Access database, but I am not using ADO,
what is the name of the database methodology I am using ?

May 29 '06 #2
PW wrote:
If I am using ASP and access an Access database, but I am not using
ADO, what is the name of the database methodology I am using ?


Are we supposed to read your mind? Give us an example.
--
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"
May 29 '06 #3
PW

"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcom> wrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
PW wrote:
If I am using ASP and access an Access database, but I am not using
ADO, what is the name of the database methodology I am using ?


Are we supposed to read your mind? Give us an example.
--
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"

Apoogies for not posting an example before ...
<td>
myDSN="DRIVER={ Microsoft Access Driver (*.mdb)}; DBQ=" &
Session("System DatabaseName")
set rs1=server.crea teobject("adodb .recordset")
rs1.CursorLocat ion = 3
rs1.CursorType = 3

mySQL = ""
mySQL = mySQL & "SELECT DISTINCT"
mySQL = mySQL & " ESCI, ESCN "
mySQL = mySQL & "FROM "
mySQL = mySQL & " QTags "
mySQL = mySQL & "ORDER BY "
mySQL = mySQL & " ESCI "
rs1.open mySQL,myDSN

myQueryString = Request.QuerySt ring("lbESCI")
mySearchString = Request.QuerySt ring("txtSearch ")

<form method="GET" action="index.a sp">
<input type="submit" value="Ok" style="width:
<%=Session("Sys temButtonWidth" )%>; height:
<%=Session("Sys temButtonheight ")%>;">
Q-TAGS SELECTION LIST
<br>
<SELECT name="lbESCI" size="9"
style="font-size:10;color:B LACK;font-family:ARIAL">
<%
Do While Not rs1.EOF
if mySearchString <> "" then
if rs1("ESCI") = mySearchString then
response.write "<option selected>"
else
response.write "<option>"
end if
elseif rs1("ESCI") = left(myQueryStr ing,6) then
response.write "<option selected>"
else
response.write "<option>"
end if
myOption = rs1("ESCI") & " | " & rs1("ESCN")
response.write myOption
response.write "</option>"
rs1.MoveNext
Loop
response.write "</select>"
%>
</form>
</td>


May 29 '06 #4

PW wrote:
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcom> wrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
PW wrote:
If I am using ASP and access an Access database, but I am not using
ADO, what is the name of the database methodology I am using ?


Are we supposed to read your mind? Give us an example.
--
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"

Apoogies for not posting an example before ...
<td>
myDSN="DRIVER={ Microsoft Access Driver (*.mdb)}; DBQ=" &
Session("System DatabaseName")
set rs1=server.crea teobject("adodb .recordset")


Server.CreateOb ject("ADOdb.Rec ordSet")
^^^^^^

What makes you think that isn't ADO?

--
Mike Brind

May 29 '06 #5
PW wrote:
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcom> wrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
PW wrote:
If I am using ASP and access an Access database, but I am not using
ADO, what is the name of the database methodology I am using ?
Are we supposed to read your mind? Give us an example.

Apoogies for not posting an example before ...
<td>
myDSN="DRIVER={ Microsoft Access Driver (*.mdb)}; DBQ=" &
Session("System DatabaseName")
set rs1=server.crea teobject("adodb .recordset")
rs1.CursorLocat ion = 3
rs1.CursorType = 3


Well, you ARE using ADO (see that "adodb.recordse t" line?). What you are
doing is using the deprecated MSDASQL provider (which is loaded by default
when you don't specify a provider in your connection string) to connect to
the obsolete Access ODBC driver.

By reading this sentence, you should get an idea about why this practice is
not recommended, even if I had left out the words "deprecated " and
"obsolete": by making ADO use a provider to communicate with a separate data
access library, you are adding an extra, and unnecessary, layer of software
between your code and the database.

Simply use the native Jet OLE DB provider. The only time the MSDASQL
provider should be used is when a native provider for your database does not
exist, or does not provide the functionality you need. Neither of these is
the case with Jet.
The other thing you are doing, also highly discouraged BTW, is failing to
use an explicit connection object. By supplying a string instead of a
connection object in the rs.open statement, you are causing ADO to open an
implicit connection. This is bad because:
1. You have no direct control over the connection and thus cannot explicitly
close it without accessing the recordset's ActiveConnectio n property.
2. Using implicit connections can disable ADO Session Pooling, resulting in
too many connections being opened to the database.

Always create and open an explicit connection object and use it for
subsequent database activity. You are not really saving yourself any time
when you use implicit connections, and you could definitely be causing
problems for your web server.

--
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"
May 29 '06 #6
PW
>
Well, you ARE using ADO (see that "adodb.recordse t" line?). What you are
doing is using the deprecated MSDASQL provider (which is loaded by default
when you don't specify a provider in your connection string) to connect to
the obsolete Access ODBC driver.

By reading this sentence, you should get an idea about why this practice
is not recommended, even if I had left out the words "deprecated " and
"obsolete": by making ADO use a provider to communicate with a separate
data access library, you are adding an extra, and unnecessary, layer of
software between your code and the database.

Simply use the native Jet OLE DB provider. The only time the MSDASQL
provider should be used is when a native provider for your database does
not exist, or does not provide the functionality you need. Neither of
these is the case with Jet.
The other thing you are doing, also highly discouraged BTW, is failing to
use an explicit connection object. By supplying a string instead of a
connection object in the rs.open statement, you are causing ADO to open an
implicit connection. This is bad because:
1. You have no direct control over the connection and thus cannot
explicitly close it without accessing the recordset's ActiveConnectio n
property.
2. Using implicit connections can disable ADO Session Pooling, resulting
in too many connections being opened to the database.

Always create and open an explicit connection object and use it for
subsequent database activity. You are not really saving yourself any time
when you use implicit connections, and you could definitely be causing
problems for your web server.

Ok, I have replaced my connection string with ...
myDSN = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" &
Session("System DatabaseName")

I'm not quite sure what change to make to change to an explicit connection
object. Can you give me an example?

TIA,
PW

May 30 '06 #7

PW wrote:

Well, you ARE using ADO (see that "adodb.recordse t" line?). What you are
doing is using the deprecated MSDASQL provider (which is loaded by default
when you don't specify a provider in your connection string) to connect to
the obsolete Access ODBC driver.

By reading this sentence, you should get an idea about why this practice
is not recommended, even if I had left out the words "deprecated " and
"obsolete": by making ADO use a provider to communicate with a separate
data access library, you are adding an extra, and unnecessary, layer of
software between your code and the database.

Simply use the native Jet OLE DB provider. The only time the MSDASQL
provider should be used is when a native provider for your database does
not exist, or does not provide the functionality you need. Neither of
these is the case with Jet.
The other thing you are doing, also highly discouraged BTW, is failing to
use an explicit connection object. By supplying a string instead of a
connection object in the rs.open statement, you are causing ADO to open an
implicit connection. This is bad because:
1. You have no direct control over the connection and thus cannot
explicitly close it without accessing the recordset's ActiveConnectio n
property.
2. Using implicit connections can disable ADO Session Pooling, resulting
in too many connections being opened to the database.

Always create and open an explicit connection object and use it for
subsequent database activity. You are not really saving yourself any time
when you use implicit connections, and you could definitely be causing
problems for your web server.

Ok, I have replaced my connection string with ...
myDSN = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" &
Session("System DatabaseName")

I'm not quite sure what change to make to change to an explicit connection
object. Can you give me an example?

TIA,
PW


Set conn = Server.CreateOb ject("ADODB.Con nection")
myDSN = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" &
Session("System DatabaseName")
conn.Open myDSN

--
Mike Brind

May 30 '06 #8
PW wrote:

Always create and open an explicit connection object and use it for
subsequent database activity. You are not really saving yourself any
time when you use implicit connections, and you could definitely be
causing problems for your web server.

Ok, I have replaced my connection string with ...
myDSN = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" &
Session("System DatabaseName")

I'm not quite sure what change to make to change to an explicit
connection object. Can you give me an example?

dim cn
set cn=createobject ("adodb.connect ion")
cn.open myDSN
....
rs1.open mySQL,cn,,,1

or

set rs1=cn.Execute( mySQL,,1)
And, while we're at it:
http://www.google.com/groups?hl=en&l...TNGP12.phx.gbl

http://groups.google.com/groups?hl=e...tngp13.phx.gbl

http://groups-beta.google.com/group/...e36562fee7804e

--
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"
May 30 '06 #9
PW
> dim cn
set cn=createobject ("adodb.connect ion")
cn.open myDSN
...
rs1.open mySQL,cn,,,1

or

set rs1=cn.Execute( mySQL,,1)
And, while we're at it:
http://www.google.com/groups?hl=en&l...TNGP12.phx.gbl

http://groups.google.com/groups?hl=e...tngp13.phx.gbl

http://groups-beta.google.com/group/...e36562fee7804e


I think I'm already doing that in a round-about fashion ... this is what I
have in my "settings.asp". ...

myDSN = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" &
Session("System DatabaseName")
set rs1=server.crea teobject("adodb .recordset")
rs1.CursorLocat ion = 3
rs1.CursorType = 3

To do it the way you suggest would be ...

dim cn
myDSN = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" &
Session("System DatabaseName")
set rs1=createobjec t("adodb.connec tion")
rs1.open myDSN
set rs1=cn.Execute( mySQL,,1)

Is that correct?

TIA,
PW

PS,
Bob, you're a fantastic help, thanks!

May 30 '06 #10

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

Similar topics

5
3731
by: klaus triendl | last post by:
hi, recently i discovered a memory leak in our code; after some investigation i could reduce it to the following problem: return objects of functions are handled as temporary objects, hence their dtor is called immediately and not at the end of the function. to be able to use return objects (to avoid copying) i often assign them to a const...
3
12207
by: Mario | last post by:
Hello, I couldn't find a solution to the following problem (tried google and dejanews), maybe I'm using the wrong keywords? Is there a way to open a file (a linux fifo pipe actually) in nonblocking mode in c++? I did something ugly like --- c/c++ mixture --- mkfifo( "testpipe", 777);
25
7578
by: Yves Glodt | last post by:
Hello, if I do this: for row in sqlsth: ________pkcolumns.append(row.strip()) ________etc without a prior:
32
4490
by: Adrian Herscu | last post by:
Hi all, In which circumstances it is appropriate to declare methods as non-virtual? Thanx, Adrian.
8
3495
by: Bern McCarty | last post by:
Is it at all possible to leverage mixed-mode assemblies from AppDomains other than the default AppDomain? Is there any means at all of doing this? Mixed-mode is incredibly convenient, but if I cannot load/unload/reload extensions into my large and slow-to-load application during development without restarting the process then the...
14
8375
by: Patrick Kowalzick | last post by:
Dear all, I have an existing piece of code with a struct with some PODs. struct A { int x; int y; };
11
3407
by: ypjofficial | last post by:
Hello All, So far I have been reading that in case of a polymorphic class ( having at least one virtual function in it), the virtual function call get resolved at run time and during that the vtable pointer is made use of.. eg. class one {
2
6098
by: Ian825 | last post by:
I need help writing a function for a program that is based upon the various operations of a matrix and I keep getting a "non-aggregate type" error. My guess is that I need to dereference my pointers, but I'm not sure. Please help. The code: void equate(matrix *A, matrix *B) { int i, j; assert(A.row_dim == B.col_dim && A.col_dim ==...
399
12745
by: =?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?= | last post by:
PEP 1 specifies that PEP authors need to collect feedback from the community. As the author of PEP 3131, I'd like to encourage comments to the PEP included below, either here (comp.lang.python), or to python-3000@python.org In summary, this PEP proposes to allow non-ASCII letters as identifiers in Python. If the PEP is accepted, the...
12
29842
by: puzzlecracker | last post by:
is it even possible or/and there is a better alternative to accept input in a nonblocking manner?
0
7807
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7730
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8241
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7820
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5624
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5301
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3753
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1061
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.