473,549 Members | 2,745 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Failed query blob columns from Paradox databse via ODBC

7 New Member
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 2914
Jmaes Wang
7 New Member
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
8650
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
5422
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 functions when run through ODBC. Query is as follows: INSERT INTO PROJECT_LINK_DEFN (LD_LINKID, LD_FROM_PROJECTNAME,LD_TO_PROJECTNAME,...
2
9982
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# 2005 Beta 2. I've searched with google and on MSDN but still can't get it working. I set up the connection using the wizards and in Server Explorer...
3
2900
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 code against SQL, but this app will need to be able to run against any ODBC compliant DB, so I am also not using stored procedures. I have tangles...
1
5300
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 begins. The operator selects a date and then presses a command button which starts a query on a Paradox table in it's directory (database to which I...
3
3663
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 This database has tables that are links using ODBC, so when you open the query it asks for the "SQL Server Login", which is different to the User...
1
3786
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 know. We can do it through borland but, I had to do it through MS technologies. So please let me know how to do it through MS Technologies (VC++/MFC or...
20
2425
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) inherited from a vendor. Although I've not used Access before, I've been plugged along with the help of our data manager (currently out with hip surgery) and...
1
2564
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 similar). Therefore, how can i add a list box (field listing of a table/query) to a form from which the user can select which of the available...
5
9116
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 $conn = @mysql_connect($db_server,$db_user,$db_pass) or die("Connection to Database Server Failed"); @mysql_select_db($db) or die("Database Selection...
0
7520
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7720
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7957
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7809
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1941
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1059
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
763
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.