Link to home
Start Free TrialLog in
Avatar of Dnx_7
Dnx_7Flag for Belgium

asked on

Update row in access database without Primary key

Hi,
ok, here is the situation, i have an access database very very basic
there is no Primary KEY
and this access database has 6 column

i have data in sqlserver that i retrieve into a dataset in my vb.net program
and i sort this dataset
the dataset has 3 column
and i wish to load those 3 column into the 3 last column of my access database

and yes it is easy if the access database has primary key but here i have to do something like that  :

first row of dataset goes to first row of access database
second row of dataset goes to second row of access database
third row of dataset goes to third row of access database
etc...

please i don't know how to do that

regards.
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dnx_7

ASKER

no i cannot change this database, that's here my BIG problem :(
in fact this database is used to display data on TV (DEKO program)
and they asked me to create a basic database with 6 columns without primary key... (yes i am frustated)
now i have to work with this database...

i ask experts because i don't know other solution... when i use dataset, oleadapter, i cannot update too... just because there is no PK

regards
you can change, if it's only for display:

create a table with the 6 fields + 1 pk,
create a view that selects the 6 fields only.
the view will have the table has now, and the table will have another table. (don't let them stop you doing so)

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dnx_7

ASKER

yes it was my first idea
but without pk, it's true, it's quite difficult... like angelll say, i think i have to change the database structure...

but if you have a solution with the 2 dataset, it would be better.

regards
>but if you have a solution with the 2 dataset, it would be better.
I would disagree on that... but you are free to do as you like :-)
Avatar of Dnx_7

ASKER

no angelll i meant
it would be better in that situation
and yes you're right, it's not good to do this... and your proposition is of course the best solution for any db manager but... here is the situation lol
regards
Avatar of Dnx_7

ASKER

Ok Ok Good news!
i told the boss to change that database structure and he is agree... after 1hour of discussion (oh my god...)
now, PEANUTS!!!

thanks to you all