473,386 Members | 1,699 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,386 software developers and data experts.

Problem using dataadapter

Here's my problem,

I try to populate a dataset using a dataadpater. I use ODBC.NET to
access COBOL data with USQL odbc driver. My problem is that my table
has no primary key. Here's my code :

Dim myConnection As New OdbcConnection("DSN=pg_dem;UID=dba;PWD=tom")
Dim myAdapter As New OdbcDataAdapter
Dim mySelectQuery As String = "SELECT no_gl, descript FROM gl_annu
WHERE no_gl='121110000'"
Dim DS As New DataSet
myAdapter.MissingSchemaAction = MissingSchemaAction.Ignore
myAdapter.SelectCommand = New OdbcCommand(mySelectQuery, myConnection)
myAdapter.Fill(DS)

I receive an error message in line : myAdapter.Fill(DS)

I don't know exactly why but it seem that my table required a primary
key if I want to use dataadapter and dataset. But if I use a
datareader, this work great but I must insert, delete and update
table. Do you know exactly why I have this problem and how I can mak
this to work

Thanks very much

Jul 21 '05 #1
0 1160

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: André Gasser | last post by:
hello newsgroup, I just discovered a weird effect in my php code. here is the flow of my code: 1. upload jepg file to server 2. create new (empty) jpeg file using imagecreatefromjpeg()...
4
by: Derek Timothy | last post by:
Hi folks I have strange problem using cmd.exe from asp code I am trying to save the results of an FTP command into a text file. When I run this command from the command line of the web server it...
3
by: Jacky Zhu | last post by:
Hi all, I am having a problem trying to consume a webservice that is developed on ..Net. I can access it without any problem using a .net client, but when I use a java client (based on Axis...
4
by: Dani | last post by:
Hi everyone Description of the problem: Using a PreparedStatement to write down an integer (int) plus a timestamp for testing purposes. When read out again the integer looks very different. We...
2
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered...
0
by: Eric Caron | last post by:
Here's my problem, I try to populate a dataset using a dataadpater. I use ODBC.NET to access COBOL data with USQL odbc driver. My problem is that my table has no primary key. Here's my code : ...
3
by: Franky | last post by:
Been having a problem using a treeview. Work great the first time the form containing it is entered but not the second time. Took a while to create a small sample that exhibits the problem, but...
2
by: mdfayazi | last post by:
I am using dataadapter to Add,Update,Delete rows in a datagridview.Update and delete are working but while adding a rows the problem comes.When I add more than one row only first row values are...
3
by: presencia | last post by:
Hi all, I have a problem using gdb. I am using Eclipse-CDT as a frontend, but since this problem is obviously related to the gcc compiler or the gdb itself, I have reproduced it without Eclipse. ...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.