473,396 Members | 2,070 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Failed query blob columns from Paradox databse via ODBC

Attached please find my code. I failed to query the blob column. Note the Paradox driver version is 4.0. The error is:

Error code: -2146232009
Error msg: ERROR [07002] [Microsoft][ODBC Paradox Driver] Too few parameters. Expected 1.
Source: odbcjt32.dll


I can query non-blob columns of the table with the same code. Can you please tell me what the problem is? Is this the limitation of .Net Framework Data Provider for ODBC? Do I need to use SQLOLEDB instead? Will SQLOLEDB resolve the issue?

I notice the following statement at http://msdn.microsoft.com/en-us/library/aa215269%28SQL.80%29.aspx:

When using the Microsoft OLE DB provider for ODBC with the SQL Server ODBC driver, all BLOB columns should be arranged after columns with other data types in a source rowset. You can use a SELECT statement to rearrange the BLOB columns to the end of the source rowset. The DTS Import/Export Wizard performs this operation automatically.


I tried placing the blob column after the other non-blob columns, I still got the same error.


I also tried "Import and Export Data" Wizard shipped with SQL Server Management studio. I couldn't import the table with blob columns.


Expand|Select|Wrap|Line Numbers
  1.             DataSet dsUsers = new DataSet();
  2.             string strQuery = "SELECT blobColumn FROM users";
  3.             dsUsers = GetNames(strQuery, "Driver={Microsoft Paradox Driver (*.db )}; Default Dir=<directory>;DBQ=<directory>");


Expand|Select|Wrap|Line Numbers
  1.         private DataSet GetNames(String strQuery, String strConnect)
  2.         {
  3.             DataSet dsNames = new DataSet();
  4.             try
  5.             {
  6.                 OdbcConnection conOdbc = new OdbcConnection(strConnect);
  7.                 OdbcCommand cmdOdbc = new OdbcCommand(strQuery, conOdbc);
  8.                 OdbcDataAdapter odaOdbc = new OdbcDataAdapter(cmdOdbc);
  9.                 odaOdbc.Fill(dsNames);
  10.                 conOdbc.Open();
  11.                 conOdbc.Close();
  12.             }
  13.             catch (OdbcException eExc)
  14.             {
  15.             }
  16.             catch (Exception eExc)
  17.             {
  18.             }
  19.             return dsNames;
  20.         }
Oct 15 '10 #1
1 2903
I also tried using Microsoft OLE DB provider. There was also an error:
"No value given for one or more required parameters."

I think there mst be a way to import blob columns from Paradox database in C#. Any ideas?
Oct 15 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Peter Arrenbrecht | last post by:
Is it correct that "INSERT INTO new SELECT * FROM old" does not copy BLOB columns? Or is there something I failed to configure properly? Thank you, Peter Arrenbrecht Opus Software AG
2
by: Puneet Murgai | last post by:
I am trying to run an access query which works when I write it directly in the database. However, it fails when an SQL script containing it is run from C++. It doesn't recognize the Iff and Nz...
2
by: Michael Gerbasio | last post by:
Hi, I'm an amateur programmer and I have been using Delphi but want to start using C#. I need to connect to some existing Paradox database tables but I'm not having any luck with it using C#...
3
by: Chris | last post by:
Hi all, I am trying to use System.Data.ODBC to insert a file into a binary field in SQL Server 2000. Now, before you yell at me, the reason I am doing this is that I am only writing intitial...
1
by: Harvest Wind | last post by:
Hi: I have a program in VB 6.0 that connects to an access database and connects to a paradox database (directory)... I query an Access table and it returns the data I need...as the program...
3
by: Danny.McCarthy | last post by:
I have a database that I would like to schedule to open and run a macro, which is easy enough; C:\Program Files\Microsoft Office\Office Msaccess.exe Nav_Stock_Values.mdb /x RunInventoryReport ...
1
by: Neerajpant | last post by:
Hi, I am facing problem while reading blob field from paradox database by using ADO. If anybody knows how to read blob fields from Paradox database by using MS Technologies, then please let me...
20
lagomorphmom
by: lagomorphmom | last post by:
Hi, I'm a microbiologist but also dabble with many of the computer needs of our little lab. My latest project involves an unfinished database (Access 2000 format, I'm running 2003 on XP PC)...
1
by: mfletcher | last post by:
Hi I have a query which calculates a large number of fields for each record, i don't want all of the fields present in the datasheet view only those fields selected by the user in a list box(or...
5
by: lisles | last post by:
i have a page funtion.php which hs the function to connect to the db /* Mysql Connection */ function connect(){ global $db_server,$db_user,$db_pass,$db;//Global Values from the config.php...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.