Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Ynt: problem with OLE DB


Message #1 by <zanoz@y...> on Mon, 23 Oct 2000 13:57:51 +0300
This is a multi-part message in MIME format.



------=_NextPart_000_0100_01C03CF9.3C22A2C0

Content-Type: text/plain;

	charset="iso-8859-9"

Content-Transfer-Encoding: quoted-printable



You can try the following steps in order.



1- strConn =3D "Driver=3D{Microsoft Access Driver (*.mdb)}; 

DBQ=3DC:\barangDB.mdb"

2- if the error still exists then be sure that

  * the database with the barangDB.mdb exists in the defined path

  * the table names, structures are used as they are defined in the 

database.

  *  try to access the database with a fairly simple SQL statement such 

as select * from...



I hope this simple check solution helps.

Ozgur ZAN

-------------------------------------------------------------------------

-------

Done Bilgi ve =DDleti=FEim Sistemleri

URL     : http://www.donetr.com

WAP     : http://wap.donetr.com

TEL     : +90 (216) 302 66 93

FAKS    : +90 (216) 302 08 24

-------------------------------------------------------------------------

-------







----- Original Message -----

From: hilma <hilma76@l...>

To: ASP Databases <asp_databases@p...>

Sent: Monday, October 23, 2000 10:30 AM

Subject: [asp_databases] problem with OLE DB





> I have office2000 in my machine and the book "beginning ASP Databases 

"

> said I can use Microsoft.Jet.OLEDB.4.0 , but when trying to run my asp

> page below , I get the message :

> ADODB.Connection error '800a0e7a'

>

> Provider cannot be found. It may not be properly installed.

>

> <html>

> <head>

> <title>less dns</title>

> </head>

> <body>

> <h3>oledb</h3>

> <%

> dim oConp

> dim oRSp

> dim strSource

> Set oConp=3DServer.CreateObject("ADODB.connection")

> Set oRSp=3DServer.CreateObject("ADODB.recordset")

> strSource =3D "Provider=3DMicrosoft.Jet OLEDB.4.0"

> strSource=3D strSource & "; Data Source=3DC:\barangDB.mdb"

> oConp.ConnectionString=3D strSource

> oConp.open

>

> sqlText=3D "SELECT tgl_jual, kode_brg, jumlah, harga_jual FROM 

transaksi "

> sqlText=3DsqlText & " WHERE tgl_jual BETWEEN #9/1/00# AND #9/30/00# ;"

> oRSp.open sqlText, oConp

> oRSp.movefirst

> response.write "<table border=3D1><tr>"

> for each fieldfield in oRSp.Fields

>      response.write "<th>" & fieldfield.name & "</th>"

> next

> response.write "</tr>"

> response.write "<tr><td>"

> response.write 

oRSp.GetString(,,"</td><td>","</td></tr><tr><td>"," ")

> response.write "</td></tr></table>"

> oRSp.close

> set oRSp=3Dnothing

> oConp.close

> set oConp=3Dnothing

> %>

>

> --- <BR>

> FREE SOFTWARE DEVELOPMENT CODE, CONTENT, AND<BR>

> INSIGHTS IN YOUR INBOX!<BR>

> Get the latest and best C++, Visual C++, Java, Visual Basic, and XML 

tips, tools, and <BR>

> developments from the experts.  Sign up for one or more of 

EarthWeb?s<BR>

> FREE IT newsletters at http://www.earthweb.com today!  <BR>

> ---<BR>

> You are currently subscribed to asp_databases as: zanoz@y...<BR>


$subst('Email.Unsub')<BR>

>

> </BODY>

> </html>

>

> I tried another example on the book and it also doesn't run. The page 

told

> that :

> Microsoft OLE DB Provider for ODBC Drivers error '80004005'

>

> [Microsoft][ODBC Driver Manager] Data source name not found and no 

default

> driver specified

>

>

> <html>

> <head>

> <title>oledb</title>

> </head>

> <body>

> <h3>oledb</h3>

> <%

> dim oConb

> dim varString

> set oConb=3DServer.CreateObject("ADODB.connection")

> varString=3D "Provider=3DMicrosoft.Jet.OLEDB.4.0"

> varString=3DvarString & "; Data Source=3DC:\My Documents\Sailors.mdb"

> 'varString=3DoConb.ConnectionString

> oConb.open 

>

> dim oRSb

> set oRSb=3DServer.CreateObject("ADODB.recordset")

> sqlText=3D"SELECT BoatName FROM Boats ;"

> oRSb.open sqlText, oConb

> response.write "<table><tr><td>"

> dim counter

> for each fieldfield in oConb.properties

>      counter=3Dcounter +1

>      response.write "<tr><td>" & counter & "</td>"

>      response.write "<td>" & fieldfield.name & "</td>"

>      response.write "<td>" & fieldfield.value & "</td>"

> next

> response.write "</table>"

>

> oRSb.close

> set oRSb=3Dnothing

> oConb.close

> set oConb=3Dnothing

> %>

>

> --- <BR>

> FREE SOFTWARE DEVELOPMENT CODE, CONTENT, AND<BR>

> INSIGHTS IN YOUR INBOX!<BR>

> Get the latest and best C++, Visual C++, Java, Visual Basic, and XML 

tips, tools, and <BR>

> developments from the experts.  Sign up for one or more of 

EarthWeb?s<BR>

> FREE IT newsletters at http://www.earthweb.com today!  <BR>

> ---<BR>

> You are currently subscribed to asp_databases as: zanoz@y...<BR>


$subst('Email.Unsub')<BR>

>

> </BODY>

> </html>

>

> Actually, The Chapter make me dizzy. Can anyone help me?







  Return to Index