Can not RecordCount and AddNew from ASP (ODBC)
Posted in 2000
Topics: Installation, Setup & Upgrades, Connectivity: ODBC / JDBC / .NET
This is a multi-part message in MIME format. ------=_NextPart_000_0049_01BFB917.34BB26D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Dear collegue ! I have installed Informix ODBC drivers and I am able to execute any SQL = statements and work with data. Only problem I found is that from ASP recordset propert rs.RecordCount = erturns -1, I can not prform rsMove(n,m)=20 and rs.AddNew does not works. Please provide me with assistenace. Thank you in adwance. ------=_NextPart_000_0049_01BFB917.34BB26D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2> <DIV><FONT face=3DArial size=3D2>Dear collegue !</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>I have installed Informix ODBC drivers = and I am=20 able to execute any SQL statements and work with data.</FONT></DIV> <DIV><FONT face=3DArial size=3D2>Only problem I found is that from ASP = recordset=20 propert rs.RecordCount erturns -1, I can not prform rsMove(n,m) = </FONT></DIV> <DIV><FONT face=3DArial size=3D2>and rs.AddNew does not works. Please = provide me=20 with assistenace.</FONT></DIV> <DIV> </DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>Thank you in=20 adwance.</FONT></DIV></FONT></DIV></BODY></HTML> ------=_NextPart_000_0049_01BFB917.34BB26D0--
We found the same thing. The easiest solution is to change your code a little bit. To get the recordcount, perform a "SELECT COUNT(*) as cnt FROM...." and instead of rs.Addnew, perform an "INSERT INTO table...." Rob Gagnon Sr. Systems Analyst Simplified Telesys - Austin, TX "George Mamaladze" <georgi@marcom.de> wrote in message news:8f6p7f$lj$1@news.xmission.com... > > This is a multi-part message in MIME format. > > ------=_NextPart_000_0049_01BFB917.34BB26D0 > Content-Type: text/plain; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > Dear collegue ! > > I have installed Informix ODBC drivers and I am able to execute any SQL = > statements and work with data. > Only problem I found is that from ASP recordset propert rs.RecordCount = > erturns -1, I can not prform rsMove(n,m)=20 > and rs.AddNew does not works. Please provide me with assistenace. > > > Thank you in adwance. > > ------=_NextPart_000_0049_01BFB917.34BB26D0 > Content-Type: text/html; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > <HTML><HEAD> > <META content=3D"text/html; charset=3Diso-8859-1" = > http-equiv=3DContent-Type> > <META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR> > <STYLE></STYLE> > </HEAD> > <BODY bgColor=3D#ffffff> > <DIV><FONT face=3DArial size=3D2> > <DIV><FONT face=3DArial size=3D2>Dear collegue !</FONT></DIV> > <DIV> </DIV> > <DIV><FONT face=3DArial size=3D2>I have installed Informix ODBC drivers = > and I am=20 > able to execute any SQL statements and work with data.</FONT></DIV> > <DIV><FONT face=3DArial size=3D2>Only problem I found is that from ASP = > recordset=20 > propert rs.RecordCount erturns -1, I can not prform rsMove(n,m) = > </FONT></DIV> > <DIV><FONT face=3DArial size=3D2>and rs.AddNew does not works. Please = > provide me=20 > with assistenace.</FONT></DIV> > <DIV> </DIV> > <DIV> </DIV> > <DIV><FONT face=3DArial size=3D2>Thank you in=20 > adwance.</FONT></DIV></FONT></DIV></BODY></HTML> > > ------=_NextPart_000_0049_01BFB917.34BB26D0-- > >