Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > error after up loading the site

Reply
Thread Tools

error after up loading the site

 
 
Soha
Guest
Posts: n/a
 
      07-21-2005
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).

 
Reply With Quote
 
 
 
 
Curt_C [MVP]
Guest
Posts: n/a
 
      07-21-2005
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
 
Reply With Quote
 
 
 
 
Soha
Guest
Posts: n/a
 
      07-24-2005
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.

 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      07-30-2005
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"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
List of free web site design, web site backgrounds, web site layoutsresources cyber XML 1 12-25-2007 11:48 PM
List of free web site design, web site backgrounds, web site layoutsresources cyber HTML 0 12-21-2007 03:47 PM
List of free web site design, web site backgrounds, web site layoutsweb sites cyber HTML 1 12-19-2007 09:07 AM
MCP site error: "There was an error while registering you as a Learner. Please try after some time." BCW Microsoft Certification 1 12-02-2005 07:20 AM
MINDPROD site applet error - Error loading class: java.awt.GraphicsEnvironment Neill Java 30 06-15-2004 10:45 PM



Advertisments