[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 247
  • Last Modified:

(0x80004005) Non specific error (ASP page)

Hi All,

I am getting this non specific error and cannot fugure why. Any ideas.
-------------------------------------------------------------------------------------------
set rsData = Server.CreateObject("ADODB.Recordset")

rsData.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\Inetpub\Data\MyDataBase.mdb; Persist security Info=False"

strSQL = "SELECT ID, LangActive, PageLang, Language, VarFolderName FROM tblLanguages Where LangActive And LangBought Order By ID;"
rsData.Source = strSQL
rsData.Open  <<<<<<<<<<<<<<<<<<<<<<<<< This line throws the error !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Kind regards

A.
0
Abiel de Groot
Asked:
Abiel de Groot
2 Solutions
 
Carl TawnSystems and Integration DeveloperCommented:
Try changing your code to the following and seeing if you get any more information:
set rsData = Server.CreateObject("ADODB.Recordset")
 
rsData.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\Inetpub\Data\MyDataBase.mdb; Persist security Info=False" 
 
strSQL = "SELECT ID, LangActive, PageLang, Language, VarFolderName FROM tblLanguages Where LangActive And LangBought Order By ID;"
rsData.Source = strSQL
 
On Error Resume Next
 
rsData.Open
 
For Each error In rsData.ActiveConnection.Errors
    Response.Write "error: " & error.Number & ", " & error.Description & "<br/>"
Next
 
On Error Goto 0

Open in new window

0
 
Ryan ChongCommented:
>>SELECT ID, LangActive, PageLang, Language, VarFolderName FROM tblLanguages Where LangActive And LangBought Order By ID

Doesn't seems a valid SQL statement for me, try something like:

SELECT ID, LangActive, PageLang, Language, VarFolderName FROM tblLanguages Where LangActive = 1 And LangBought = 'balbal' Order By ID


in your "where" cause, try compare it with a value.....
0
 
Abiel de GrootAuthor Commented:
Hi Guys,

Many thanks. Both of your ideas helped in finally respoving the issue. It was a very stupid thing look at the select statement again:

SELECT ID, LangActive, PageLang, Language ...

The word "Language" is a reserved ASP word.

That caused the error.

Many thanks again.

Kind regards

Abiel M de groot

0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now