Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    2

    Question Unanswered: handling the text datatype from asp.net

    Hi,

    We are building a web application using asp.net. We are using the informix odbc driver version 3.81. Informix database version 7.3.2.
    We have created a stored procedure to insert data into a table. The table has a field of "text" datatype.
    I am unable to insert data into this field. It seems, Problem has to do with resolving the datatype.

    For those familiar with .NET, following is the syntax i am using to describe the field in the stored procedure call that i am making:

    Dim textcol As OdbcParameter = New OdbcParameter("",OdbcType.Text)
    textcol.Value = "dummy text"
    OdbcCommand.Parameters.Add(textcol)

    OdbcType.Text is supposed to match up with the informix Text datatype, but there seems to be a problem.

    Any help would be greatly appreciated!

    Thank you in advance.

  2. #2
    Join Date
    Aug 2003
    Location
    Delft, The Netherlands (EU)
    Posts
    447

    Re: handling the text datatype from asp.net

    Don't you have an OdbcType.Char, too?
    Make everything as simple as possible, but not simpler! - A. Einstein
    DB Problems? DB Explorer, BTrieve Re-engineering, DB Conversions & ETL? Conversion Tool

  3. #3
    Join Date
    Mar 2004
    Posts
    2

    Re: handling the text datatype from asp.net

    Yes there is but Odbc.Char doesn't match up with the Text datatype of Informix. I resolved the problem though. It seems that the problem is with the syntax used below:

    Dim textcol As OdbcParameter = New OdbcParameter("",OdbcType.Text)
    textcol.Value = "dummy text"
    OdbcCommand.Parameters.Add(textcol)

    if you rearrange it to:

    myCommand.Parameters.Add(New OdbcParameter("", OdbcType.Text)).Value = Instructions

    then it works. just an ODBC flaw i guess...

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •