473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

error after up loading the site

After i upload the site i got an error on a page which was working on
the localhost.the error is
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Oracle][ODBC]Option value changed.

/arabic/adv_result.asp, line 244

this line is where i open the recordset. the connection to the database
is the same connection for the localhost and the hosting server.
this is the code i have problem in it:
<%'the connection to the orcale database server
set con=server.createobject("adodb.connection")
con.open "DSN=micn_db;UID=mic_news;PWD=micn;"

counts=0 'the variable which holds the numbers of records

s_text=request("text") 'the variable which holds the string i'm
searching for in the database

'the recordset in which i receive the data
set rs_search=server.createobject("adodb.recordset")

'i use this recordset to count the records i get
set rs_searchc=server.createobject("adodb.recordset")

'the sql statement i use
sql_search="select n_data.news_title, n_data.news_id,
n_data.news_date,n_source_lkp.source_desc from
mic_news.n_data,n_source_lkp where (n_source_lkp.source_desc like
'%"&s_text&"%') and n_data.area_id=1 and ((n_data.news_ref_date >=
'07/06/2005') or (n_data.news_ref_date <='21/07/2005')) and
n_source_lkp.source_id = n_data.source_id order by news_priority,
news_date; "

'here is wher i get the error in the opening of the recordset
rs_search.open sql_search,con,2,3

'to count the records i get from the previous sql statment
rs_searchc.open sql_search,con,1,3

'to display the data
if not rs_search.eof then
counts=counts+(rs_searchc.recordcount)
%>
<tr>
<%do until rs_search.eof%>
<tr>
<td><a
href="newscont.asp?n_id=<%=rs_search(1)%>"><%=rs_s earch(0)%></a>&nbsp;&nbsp;
</td>
</tr><tr>
<td><font size="2"
color="#C0C0C0"><%=rs_search(3)%>&nbsp;&nbsp;&nbsp ;&nbsp;<%=rs_search(2)%>&nbsp;</font></td>
</tr>
<%
rs_search.movenext
loop
end if
rs_search.close
rs_searchc.close
%>

i want to know why did this code work on the localhost and it didn't
work on the hosting server.
Note: the database server is the same hosting server and i use it also
on the localhost. and all the other asp pages work fine on both
environment (localhost and the hosting server).

Jul 22 '05 #1
3 1709
Soha wrote:
After i upload the site i got an error on a page which was working on
the localhost.the error is
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Oracle][ODBC]Option value changed.

/arabic/adv_result.asp, line 244


80004005 is often a permissions issue. In this case the IIS user and the
createobject probably.
Look on www.aspfaq.com for the error #, you should get some decent stuff.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Jul 22 '05 #2
I have already look on www.aspfaq.com before i post this erorr. and i
have something to add to my code. this part of the sql_statment is
actually written in this way: "((n_data.news_ref_date >=
"'&request("from")&"') or (n_data.news_ref_date <='"&request("to")&"'))
"
"from" and "to" are textfields and they return type date.
and i think that they coz this problem but i don't know how to solve it.

Jul 24 '05 #3
Soha wrote:
I have already look on www.aspfaq.com before i post this erorr. and i
have something to add to my code. this part of the sql_statment is
actually written in this way: "((n_data.news_ref_date >=
"'&request("from")&"') or (n_data.news_ref_date
<='"&request("to")&"')) "

Dynamic SQL ... ughh!
"from" and "to" are textfields and they return type date.
and i think that they coz this problem but i don't know how to solve
it.

Given that you are using this insecure* as well as inefficient technique,
these should help:
http://www.aspfaq.com/show.asp?id=2313 vbscript
http://www.aspfaq.com/show.asp?id=2040 help with dates
http://www.aspfaq.com/show.asp?id=2260 dd/mm/yyy confusion
Here's a better way:
http://groups-beta.google.com/group/...d322b882a604bd

Even this is better:
http://groups-beta.google.com/group/...e36562fee7804e

Bob Barrows
*Here is why it is insecure:
http://mvp.unixwiz.net/techtips/sql-injection.html
http://www.sqlsecurity.com/DesktopDefault.aspx?tabid=23
--
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"
Jul 30 '05 #4

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

Similar topics

7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
0
by: Erwan | last post by:
I have a strange (but very blocking) result when using the smtpmail class from an ASPX page : here is the (very simple !) code... '-------------------------------------------------- mail.To =...
1
by: campwes | last post by:
Hey, all! We're having trouble displaying SQL Server data in a web site as XML, using a transform. The query is a simple SELECT statement. When running the query, we get the following error from...
0
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub)...
3
by: Timbo | last post by:
This is a really weird one and very odd. I have written a web site using VS2005 and .Net 2.0, all works very well when running it locally. However when I publish it to my web server (hosted by...
1
by: Greg Collins [Microsoft MVP] | last post by:
I have a site that uses a custom 404 error page to perform URL Rewriting. This works excellent for all my needs except for one area. When transforming XML, I have some XSLT code that uses the...
3
by: Mike | last post by:
Hi I have problem as folow: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type...
0
by: Jonathan Crawford | last post by:
Hi I have had theis error four a week now. I am completely questioning my future as a ms programmer. As far as i am aware I have done nothing wrong. The site worked for 4 years in .Net 1 and iI...
0
by: John [H2O] | last post by:
There's a lot of greek for me here ... should I post to numpy-discussions as well??? The backtrace is at the bottom.... Thanks! GNU gdb Fedora (6.8-21.fc9) Copyright (C) 2008 Free...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...

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.