Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!devnull!lance From: lance@mpd.tandem.com (Lance Hartmann) Newsgroups: comp.databases Subject: Re: Informix ESQL/C SQLDA-structure problem Summary: Informix dynamic ESQL/C Keywords: INFORMIX DYNAMIC ESQL/C Message-ID: <344@devnull.mpd.tandem.com> Date: 27 Jun 91 15:02:43 GMT References: <1991Jun26.121056.19420@nntp.hut.fi> Sender: news@devnull.mpd.tandem.com Organization: Tandem Computers (MPD) Austin, TX Lines: 19 In article <1991Jun26.121056.19420@nntp.hut.fi> vwa@cs.hut.fi writes: >When storing integer information in the sqlda-structure > > sqlda->sqlvar[i].sqldata = malloc (SIZINT) > >and after that executing a prepared INSERT with that structure, >I never get INTEGERS right. They are always treated as CHARS >[REMAINDER DELETED] Do you have the data type specified correctly (ie. do you have sqlda->sqlvar[i].sqltype = CINTTYPE)? Also, don't forget that you should be using rtypalign() to make sure you're on the correct boundary for that variable type. This may be your problem. Remember that a malloc() doesn't force any kind of boundary alignment. -- Lance G. Hartmann - cs.utexas.edu!devnull!lance (Internet) ------------------------------------------------------------------------------- DISCLAIMER: All opinions/actions expressed herein reflect those of my VERY OWN and shall NOT bear any reflection upon Tandem or anyone else for that matter.