Re: Forward-only recordsets
- From: "JohnnyC" <j@xxxxxx>
- Date: Wed, 16 Apr 2008 20:24:56 -0400
The offending code is store-bought. The client is doing a social networking
site. The code is called eMates from EnthrallWeb.com. You are absolutely
correct. The code is garbage.
You are also correct about the text columns. They are varchar(max)
datatypes. Switching them to varchar(xxx) fixed the problem with the field
ordering.
I've never run into the issue before. Thanks for your help.
"Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message
news:u4rJK8$nIHA.6096@xxxxxxxxxxxxxxxxxxxxxxx
JohnnyC wrote:
I've got a strange problem with a forward-only recordset.
The front-end is an ASP web. The backend is a sql2005 database.
In the code, there are sql statements using '*'. For example "select
* from tableA"
This is pretty universally regarded as a bad practice in production
code: http://www.aspfaq.com/show.asp?id=2096
The recordset is populated using theIt may be an issue with the datatypes. Are you using ODBC and are Text
connection.execute method. i.e. set rs = conn.execute(sql)
When referencing the fields in the recordset, if they are not
referenced in the same order as the underlying table, we are getting
blanks returned. If I use explicit field names in the sql call, it
doesn't matter the order of how we read the rs fields.
or Image columns involved?
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
.
- References:
- Forward-only recordsets
- From: JohnnyC
- Re: Forward-only recordsets
- From: Bob Barrows [MVP]
- Forward-only recordsets
- Prev by Date: Re: Could not update; currently locked error
- Next by Date: database connectivity vb-sql
- Previous by thread: Re: Forward-only recordsets
- Next by thread: Re: Could not update; currently locked error
- Index(es):
Relevant Pages
|
|