Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 whats wrong with this?
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

redbrad0
Advanced Member

USA
3725 Posts

Posted - 21 July 2001 :  16:25:45  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
this is the error i am getting. i just installed IIS on this windows 2000 and trying to run the script from localhost..

Technical Information (for support personnel)

Error Type:
(0x80004005)
Unspecified error
/Default.asp, line 18

here is the code with line 18 in red

<%
Server.ScriptTimeout = 3000

strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\needs_contacted.mdb;" '## MS Access 2000
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
Set rs = Server.CreateObject("ADODB.RecordSet")

strConnString2 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\old_database.mdb;" '## MS Access 2000
set my_Conn2 = Server.CreateObject("ADODB.Connection")
my_Conn2.Open strConnString2
Set rs2 = Server.CreateObject("ADODB.RecordSet")



strSql2 = "SELECT Domain"
strSql2 = strSql2 & " FROM LeftOverDomains "
set rs2 = my_Conn2.Execute (strSql2)

if rs2.eof or rs2.bof then
Response.Write "error"
else
do until rs.eof or rs.bof
strDomainName=lcase(rs2("Domain"))
strSql = "SELECT Domain"
strSql = strSql & " FROM LeftOverDomains "
strSql = strSql & " WHERE Domain='" & strDomainName & "'"
set rs = my_Conn.Execute (strSql2)
if rs.eof or rs.bof then
' NOT IN DB SO ADD IT

strSql = "INSERT INTO MailingList (WebAddress) VALUES ('" & strDomainName & "')"
my_Conn.Execute (strSql)
else
' IN DB SO DONT ADD THEM
end if
rs.movenext
loop
end if
%>


Brad

gor
Retired Admin

Netherlands
5511 Posts

Posted - 21 July 2001 :  16:31:05  Show Profile  Visit gor's Homepage
try either removing

Set rs2 = Server.CreateObject("ADODB.RecordSet")

or use

rs2.open strSql, my_Conn

instead of

set rs2 = my_Conn2.Execute (strSql2)


Now you are trying to create the same object twice (you use set twice).

Pierre
Join the Snitz WebRing
Go to Top of Page

Id
Junior Member

USA
129 Posts

Posted - 21 July 2001 :  16:31:44  Show Profile  Visit Id's Homepage
set rs2 = my_Conn2.Execute (strSql2)

ummm i'm thinking you don't want a space aver my_conn2.execute
you probably want it to be this


Set rs2 = my_Conn2.Execute(strSql2)


Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 21 July 2001 :  16:53:42  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
could something not be right in IIS? cause i just get

Error Type:
(0x80004005)
Unspecified error

Brad
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 21 July 2001 :  16:57:36  Show Profile  Visit gor's Homepage
quote:

could something not be right in IIS? cause i just get

Error Type:
(0x80004005)
Unspecified error



Even after you changed it to:

<%
Server.ScriptTimeout = 3000

strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\needs_contacted.mdb;" '## MS Access 2000
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
Set rs = Server.CreateObject("ADODB.RecordSet")

strConnString2 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\old_database.mdb;" '## MS Access 2000
set my_Conn2 = Server.CreateObject("ADODB.Connection")
my_Conn2.Open strConnString2
Set rs2 = Server.CreateObject("ADODB.RecordSet")



strSql2 = "SELECT Domain"
strSql2 = strSql2 & " FROM LeftOverDomains "
set rs2 = my_Conn2.Execute (strSql2)
rs2.Open strSql2, my_Conn2

if rs2.eof or rs2.bof then
Response.Write "error"
else
do until rs.eof or rs.bof
strDomainName=lcase(rs2("Domain"))
strSql = "SELECT Domain"
strSql = strSql & " FROM LeftOverDomains "
strSql = strSql & " WHERE Domain='" & strDomainName & "'"
set rs = my_Conn.Execute (strSql2)
if rs.eof or rs.bof then
' NOT IN DB SO ADD IT

strSql = "INSERT INTO MailingList (WebAddress) VALUES ('" & strDomainName & "')"
my_Conn.Execute (strSql)
else
' IN DB SO DONT ADD THEM
end if
rs.movenext
loop
end if
%>





Pierre
Join the Snitz WebRing
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 21 July 2001 :  17:02:31  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
if i have it exactly what you typed in, i get

Error Type:
(0x80004005)
Unspecified error
/Default.asp, line 18


which 18 is....
rs2.Open strSql2, my_Conn2

Brad
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 21 July 2001 :  17:07:10  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
even this simple script gets the same error...


<%
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\needs_contacted.mdb;" '## MS Access 2000
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
Set rs = Server.CreateObject("ADODB.RecordSet")

strSql = "SELECT Domain"
strSql = strSql & " FROM LeftOverDomains "
set rs = my_Conn.Execute (strSql)
if rs.eof or rs.bof then
else
do until rs.eof or rs.bof
Response.Write rs("Domain")
rs.movenext
loop
end if
%>


Error Type:
(0x80004005)
Unspecified error
/test.asp, line 9


line 9 = "set rs = my_Conn.Execute (strSql)"

Brad
Go to Top of Page

Id
Junior Member

USA
129 Posts

Posted - 21 July 2001 :  17:13:38  Show Profile  Visit Id's Homepage
i may be smoking something, but i think it has to do with a space after .execute, or your .open command, I dunno, i don't use that syntax to open my connections.

though i do know, you don't need to set rs to a recordset if you want to execute something

Edited by - Id on 21 July 2001 17:14:27
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 21 July 2001 :  17:14:16  Show Profile  Visit gor's Homepage
quote:

even this simple script gets the same error...


<%
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\needs_contacted.mdb;" '## MS Access 2000
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
Set rs = Server.CreateObject("ADODB.RecordSet")

strSql = "SELECT Domain"
strSql = strSql & " FROM LeftOverDomains "
set rs = my_Conn.Execute (strSql)
if rs.eof or rs.bof then
else
do until rs.eof or rs.bof
Response.Write rs("Domain")
rs.movenext
loop
end if
%>


Error Type:
(0x80004005)
Unspecified error
/test.asp, line 9


line 9 = "set rs = my_Conn.Execute (strSql)"

Brad



This script should throw an error since you use set rs twice again.

Pierre
Join the Snitz WebRing
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 21 July 2001 :  17:26:35  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
quote:

This script should throw an error since you use set rs twice again.



ok well i removed the other one, and still the same thing...

<%
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\needs_contacted.mdb;" '## MS Access 2000
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString

strSql = "SELECT Domain"
strSql = strSql & " FROM LeftOverDomains "
set rs = my_Conn.Execute(strSql)
if rs.eof or rs.bof then
else
do until rs.eof or rs.bof
Response.Write rs("Domain")
rs.movenext
loop
end if
%>



Error Type:
(0x80004005)
Unspecified error
/Default.asp, line 18


Brad
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 21 July 2001 :  17:38:34  Show Profile  Visit gor's Homepage
ehm....(running out of ideas)....
How about using:

strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\Inetpub\wwwroot\needs_contacted.mdb;" '## MS Access 97
instead of the Jet engine ?

Pierre
Join the Snitz WebRing
Go to Top of Page

Id
Junior Member

USA
129 Posts

Posted - 21 July 2001 :  17:46:22  Show Profile  Visit Id's Homepage
this may sound like a really really far stretch, and maybe it's just the way i learned to program, but the connection to the database just doesn't seem right

try this

<%
......mdb" '## MS Access 2000
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.ConnectionString = strConnString
my_Conn.Open
str....
%>


Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 21 July 2001 :  17:49:42  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
huwr the id one worked! i have access 2000, dont know why i would need 97, anyway so now that part works. so now when im trying to put the data into a new database it gives me an error again...


<%
strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\Inetpub\wwwroot\old_database.mdb;" '## MS Access 97
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString

strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\Inetpub\wwwroot\needs_contacted.mdb;" '## MS Access 97
set my_Conn2 = Server.CreateObject("ADODB.Connection")
my_Conn2.Open strConnString

strSql = "SELECT Domain"
strSql = strSql & " FROM LeftOverDomains "
set rs = my_Conn.Execute(strSql)
if rs.eof or rs.bof then
else
do until rs.eof or rs.bof
strDomainName = trim(lcase(rs("Domain")))

strSql = "INSERT INTO MailingList (WebAddress) VALUES ('" & strDomainName & "')"
Response.Write strSql
my_Conn2.Execute (strSql)

rs.movenext
loop
end if
%>


Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/test.asp, line 20

Brad
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 21 July 2001 :  17:55:07  Show Profile  Visit gor's Homepage
This is an easy one, mostly asked by Snitz Forums newbies

You need to place the database in a directory where the IIS-user has write-access.
If you use frontpage, just import the database and have it create the /fpdb with the correct settings.
Otherwise you'll have to set the write permissions yourself (in W2K not IIS).


btw, that connectionstring also works for an Access 2000 database !

Pierre
Join the Snitz WebRing
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 21 July 2001 :  18:02:00  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
quote:

This is an easy one, mostly asked by Snitz Forums newbies



and this is what i get for getting like 2 hours a sleep a night, i cant think, im tired, but i got to keep going

Brad
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 21 July 2001 :  18:16:16  Show Profile  Visit gor's Homepage
quote:

and this is what i get for getting like 2 hours a sleep a night, i cant think, im tired, but i got to keep going



Well, I'm going to bed and get some sleep (+6 hours here), hope you get this thing finished...sleep helps...fresh start often is much more effective.

Pierre
Join the Snitz WebRing
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07