From: Peter Carter Date: March 22 2000 11:47pm Subject: Re: interpreting ODBC error code S1090 List-Archive: http://lists.mysql.com/myodbc/1369 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit on 3/22/00 9:09 AM, Derek M Wickersham at Wickersham_Derek_M@stripped wrote: > Hi, > > I'm unable to solve this problem and I think (hope) this is the right place to > start. I have MyODBC on a Windows NT server connecting to a mySQL database on > a Linux machine. I'm using Cold Fusion on the Windows machine and a particular > query fails for some records (not all). I can type in the query manually in > the mysql client on the Linux machine and it works fine. So I think it must be > related to something in MyODBC and that's why I'm posting here. > > Here is the error I'm getting: > > ---------------------------------------------------------- > ODBC Error Code = S1090 (Invalid string or buffer length) > > [TCX][MyODBC]SQLBindParameter not used for all parameters > ---------------------------------------------------------- > > > > Here is what the SQL looks like: > > > SQL = "insert into Standards ( ID ,CommitteeID ,StdNumber ,Subject ,ModifyDate > ,Link ,Stage ,SortStr ,Related ) values ( 11388 ,8288 > ,'1111:2222' ,'Something something something - Size "S"' ,'1999-07-08 > 10:47:19' > ,'http://web.something.org/SiteLicense/Download.asp?sku=xxx+1111:2222' > ,'0.0' ,'2697' ,'XYZ Std: J222 J333' )" > > > And of course, here is what each field is: > > ID: int 4 > CommitteeID: int 4 > StdNumber: varchar 100 > Subject: text 65535 > ModifyDate: timestamp 16 > Link: text 65535 > Stage: double 8 > SortStr: varchar 100 > Related: text 65535 > > > OK, I'm not an expert SQL/ODBC programmer, so please be kind if I'm doing > something blatantly errant. My hunch is the question mark in the Link field is > getting interpreted as a parameter. However, it is not a parameter and I don't > know how to specify that. Does it need to be escaped somehow? And how come I > can enter this exact query into the mysql client directly with no complaints? > > Thanks in advance, > Derek > > > > --------------------------------------------------------------------- > Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before > posting. To request this thread, e-mail myodbc-thread1362@stripped > > To unsubscribe, send a message to the address shown in the > List-Unsubscribe header of this message. If you cannot see it, > e-mail myodbc-unsubscribe@stripped instead. > Your problem is two fold. 1) Make sure your MySQL server has a large network buffer size. 2) Your ODBC Manager, not driver, is only required to have a 4k buffer. This is standard ODBC manager specs (a lot of people miss this). CF normally opens a select in a RO / Forward Only mode (aka firehose), which bypasses manager cursors. Thus it should not be a problem here. It seems to be your blobs that are preventing the selects from finalizing. Increasing the network packet size to 1M will not hamper performance. I have a genealogy DB on my server with 400,000 records, with no memory problems. It typically only grows to 32M usage after about a month.