Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM ODBC Driver » View Thread |
Messages 1 to 6 of 6 total |
Unknown SQL Type - 0. |
Wed, Jan 25 2012 3:19 PM | Permanent Link |
Mike Corrente | I'm not sure whether to be proud or embarrassed that 4 of the last 6 posts in this forum are mine. I like to solve my problems publicly so others can benefit from (or laugh at) my mistakes.
Anyway, when trying to use an ODBCDataReader to read the contents of a BLOB field, I get error "Unknown SQL Type - 0." Pretty simple code - just a SELECT * FROM Table query with one BLOB field at the end. Rest of the fields read just fine. Am I missing something. Can BLOB fields not be read using DataReader? |
Wed, Jan 25 2012 10:25 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Mike,
<< I'm not sure whether to be proud or embarrassed that 4 of the last 6 posts in this forum are mine. I like to solve my problems publicly so others can benefit from (or laugh at) my mistakes. >> No problem at all. << Anyway, when trying to use an ODBCDataReader to read the contents of a BLOB field, I get error "Unknown SQL Type - 0." Pretty simple code - just a SELECT * FROM Table query with one BLOB field at the end. Rest of the fields read just fine. >> I just tried the following in C#/VS2008: private void button1_Click(object sender, EventArgs e) { OdbcConnection DataConnection = new OdbcConnection("DSN=Temp"); OdbcCommand DataCommand = new OdbcCommand(); DataCommand.Connection = DataConnection; DataConnection.Open(); DataCommand.CommandText = "SELECT * FROM Albums"; DataCommand.Prepare(); OdbcDataReader DataReader = DataCommand.ExecuteReader(); DataReader.Read(); DataReader.GetValue(8); MessageBox.Show(DataReader.GetString(9)); DataReader.Read(); DataReader.GetValue(8); MessageBox.Show(DataReader.GetString(9)); DataCommand.Dispose(); DataConnection.Close(); } and it works fine. The Albums table has both a Blob field (8) and a Clob (9) field. If you could email me your code/table, I can take a further look and see what the issue is. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Jan 26 2012 9:16 AM | Permanent Link |
Mike Corrente | Thanks, Tim. Sent my code and table to you. When you fix me, I'll come back and post solution.
|
Fri, Jan 27 2012 8:55 AM | Permanent Link |
Mike Corrente | Tim,
Not sure if this matters, but forgot to mention the table is v3. |
Tue, Feb 7 2012 11:33 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Mike,
<< Not sure if this matters, but forgot to mention the table is v3. >> Handled via email. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Feb 11 2016 2:44 PM | Permanent Link |
Suler Abou Secure Check Cashing, Inc. | I have the same issue, can you let me know how you solved this?
"Tim Young [Elevate Software]" wrote: Mike, << Not sure if this matters, but forgot to mention the table is v3. >> Handled via email. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |