Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Trouble with inner join...


Message #1 by FungHM <funghm@s...> on Thu, 25 Oct 2001 14:03:20 +0800
hi there,



i got a problem here. can anyone see what wrong with the code below? the error

wrote this:



error '80004005'

unspecified error



my codes are as belows.



<%

Set cnn=Server.CreateObject("ADODB.Connection")

cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=C:\My

Documents\InventorySystem.mdb"

Set rst=cnn.execute("SELECT Head.SECTION, Head.SECTION_HEAD,

Head.SECTION_HEAD_EMAIL, HR.EMP_ID, HR.EMP_NAME, HR.EMP_EMAIL, HR.EMP_ICNO FROM

HR INNER JOIN Head ON Head.DEPARTMENT_ID = HR.DEPARTMENT_ID WHERE

HR.EMP_ID='434'")

%>







Message #2 by "Jeff Dupont" <jdupont@j...> on Thu, 25 Oct 2001 00:45:49 -0700
Well first thing that stick out in my eyes, and would be the first option

that I would try if I were resolving this would be to move the database out

of the my documents dir and put it in a dir like c:\database\*.mdb Because

the space in the my documents directory can cause a few problems, but that's

just in my experience.



Jeff Dupont

Light Year Technologies, LLP

http://www.lytechnologies.com

c:  xxx-xxx-xxxx



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

From: FungHM [mailto:funghm@s...]

Sent: Wednesday, October 24, 2001 11:03 PM

To: ASP Databases

Subject: [asp_databases] Trouble with inner join...

Importance: High





hi there,



i got a problem here. can anyone see what wrong with the code below? the

error

wrote this:



error '80004005'

unspecified error



my codes are as belows.



<%

Set cnn=Server.CreateObject("ADODB.Connection")

cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=C:\My

Documents\InventorySystem.mdb"

Set rst=cnn.execute("SELECT Head.SECTION, Head.SECTION_HEAD,

Head.SECTION_HEAD_EMAIL, HR.EMP_ID, HR.EMP_NAME, HR.EMP_EMAIL, HR.EMP_ICNO

FROM

HR INNER JOIN Head ON Head.DEPARTMENT_ID = HR.DEPARTMENT_ID WHERE

HR.EMP_ID='434'")

%>














$subst('Email.Unsub')





Message #3 by FungHM <funghm@s...> on Thu, 25 Oct 2001 16:15:45 +0800
hi,

thanks but it didnt work .







Jeff Dupont wrote:



> Well first thing that stick out in my eyes, and would be the first option

> that I would try if I were resolving this would be to move the database out

> of the my documents dir and put it in a dir like c:\database\*.mdb Because

> the space in the my documents directory can cause a few problems, but that's

> just in my experience.

>

> Jeff Dupont

> Light Year Technologies, LLP

> http://www.lytechnologies.com

> c:  xxx-xxx-xxxx

>

> -----Original Message-----

> From: FungHM [mailto:funghm@s...]

> Sent: Wednesday, October 24, 2001 11:03 PM

> To: ASP Databases

> Subject: [asp_databases] Trouble with inner join...

> Importance: High

>

> hi there,

>

> i got a problem here. can anyone see what wrong with the code below? the

> error

> wrote this:

>

> error '80004005'

> unspecified error

>

> my codes are as belows.

>

> <%

> Set cnn=Server.CreateObject("ADODB.Connection")

> cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=C:\My

> Documents\InventorySystem.mdb"

> Set rst=cnn.execute("SELECT Head.SECTION, Head.SECTION_HEAD,

> Head.SECTION_HEAD_EMAIL, HR.EMP_ID, HR.EMP_NAME, HR.EMP_EMAIL, HR.EMP_ICNO

> FROM

> HR INNER JOIN Head ON Head.DEPARTMENT_ID = HR.DEPARTMENT_ID WHERE

> HR.EMP_ID='434'")

> %>

>

>

Message #4 by "NabinKumar Sahu" <sahunabin@r...> on 25 Oct 2001 10:43:19 -0000
You try this 

> <%

> Set cnn=Server.CreateObject("ADODB.Connection")

> cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Database="c:\Mydocuments\InventorySystem.mdb""

> Set rst=cnn.execute("SELECT Head.SECTION, 

> Head.SECTION_HEAD,

> Head.SECTION_HEAD_EMAIL, HR.EMP_ID, HR.EMP_NAME, 

> HR.EMP_EMAIL, HR.EMP_ICNO

> FROM

> HR INNER JOIN Head ON Head.DEPARTMENT_ID = 

> HR.DEPARTMENT_ID WHERE

> HR.EMP_ID=3D'434'")

> %>

> 

> NABIN 

Message #5 by "Sanjeev Gandhi" <sgandhi@e...> on Fri, 26 Oct 2001 11:50:16 -0700
Hi,



Check the connection, if it is connected or not.

I mean, usualyy my documents folders has space in its name. Have you created

your own mydocuments.

otherwise give its name as mydocu~1

cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data

Source=C:\MyDocu~1\InventorySystem.mdb"



just a guess...



-tar

-Sanjeev Gandhi





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

From: "FungHM" <funghm@s...>

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

Sent: Wednesday, October 24, 2001 11:03 PM

Subject: [asp_databases] Trouble with inner join...





> hi there,

>

> i got a problem here. can anyone see what wrong with the code below? the

error

> wrote this:

>

> error '80004005'

> unspecified error

>

> my codes are as belows.

>

> <%

> Set cnn=Server.CreateObject("ADODB.Connection")

> cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=C:\My

> Documents\InventorySystem.mdb"

> Set rst=cnn.execute("SELECT Head.SECTION, Head.SECTION_HEAD,

> Head.SECTION_HEAD_EMAIL, HR.EMP_ID, HR.EMP_NAME, HR.EMP_EMAIL, HR.EMP_ICNO

FROM

> HR INNER JOIN Head ON Head.DEPARTMENT_ID = HR.DEPARTMENT_ID WHERE

> HR.EMP_ID='434'")

> %>

  Return to Index