If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Database Connection

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-28-03, 01:02
Ragesh Ragesh is offline
Registered User
 
Join Date: Oct 2003
Location: Chennai
Posts: 2
Question Database Connection

I am getting the following error while attempting to connect to a
database

Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC driver does not support the requested properties.
/g2gx/listrecords.asp, line 107

Here is the code i had used

<%
set con=server.createobject("adodb.connection")
set listRs=server.CreateObject("adodb.recordset")
con.open "DSN=MyData"
dim sql

If Request.Form("select1")="All" Then
sql="select * from details where Status=1 ORDER BY Id_no"
ElseIf Request.Form("select1")="Name" Then
sql = "select * from details where Name like '" & criteria & "%' and Status=1 ORDER BY Id_no"
ElseIf Request.Form("select1")="Company" Then
sql="select * from details where Company like '" & criteria & "%' and Status=1 ORDER BY Id_no"
ElseIf Request.Form("select1")="Phone" Then
sql="select * from details where Phone like '" & criteria & "%' and Status=1 ORDER BY Id_no "
End If
listRs.Open sql,con,1
%>
...................
..................
....................
<%
If listRs.BOF = False and listRs.EOF = False Then
dim i
i = 1
While not listRs.EOF
%>
<tr vAlign=top>
<td width="37" rowspan="2"><font face="Verdana, Arial, Helvetica,
sans-serif" size="2"><%=listRs("Id_no")%></font>
</td>
<td width="147"><font face="Verdana, Arial, Helvetica, sans-serif"
size="2"><%=listRs("Name")%></font>
</td>
<td width="100" rowspan="2">&nbsp;</td>
<td width="200" rowspan="2">&nbsp;</td>
<td width="89" rowspan="2">&nbsp;</td>
<td width="62" rowspan="2">&nbsp;</td>
<td width="66" rowspan="2">
<P align=center>
<INPUT id=checkbox1 type=checkbox name=checkbox
value="<%=listRs("Id_no")%>">
</P></td>
</tr>
<tr vAlign=top>
<td width="147" height="5">
<input type="text" name="textfield" value="<%=listRs("Email")%>">
</td>
</tr>
<%
i=i+1
listRs.movenext
wend
End if
%>

................................
................................
................................
................................


Can anybody help me in this regard

Regards

RAGESH
Reply With Quote
  #2 (permalink)  
Old 11-02-03, 18:27
sco08y sco08y is offline
Registered User
 
Join Date: Oct 2002
Location: Baghdad, Iraq
Posts: 697
Re: Database Connection

Post it in the ASP section, and at least give people a clue where line 107 is.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On