Click here to Skip to main content
15,902,299 members
Home / Discussions / Database
   

Database

 
GeneralRe: Opening A Database Connection Pin
#realJSOP19-Jan-10 8:37
professional#realJSOP19-Jan-10 8:37 
AnswerRe: Opening A Database Connection Pin
Shameel19-Jan-10 8:04
professionalShameel19-Jan-10 8:04 
GeneralRe: Opening A Database Connection [modified] Pin
#realJSOP19-Jan-10 8:25
professional#realJSOP19-Jan-10 8:25 
QuestionConsuming a web service using a stored procedure Pin
Mohammad Al Hoss19-Jan-10 3:10
Mohammad Al Hoss19-Jan-10 3:10 
AnswerRe: Consuming a web service using a stored procedure Pin
Eddy Vluggen19-Jan-10 5:06
professionalEddy Vluggen19-Jan-10 5:06 
QuestionFloating Point Numbers Stored as Text with Integration Services Pin
moon_stick19-Jan-10 2:22
moon_stick19-Jan-10 2:22 
AnswerRe: Floating Point Numbers Stored as Text with Integration Services Pin
Eddy Vluggen19-Jan-10 11:15
professionalEddy Vluggen19-Jan-10 11:15 
QuestionSQL Application - stuck on the way I should update my Table Pin
ps0f0r18-Jan-10 22:24
ps0f0r18-Jan-10 22:24 
Greetings! My name is Christos and I come from greece, happy to mmet you all!

Anyways,
I should start describing my problem. We use an ERP program in conjuction with SQL server and lots of tables that keep track of product records customers and all these kinds of stuff. I am building a fairly simple Warehouse Inventory Application. I have created a custom Inventory table that I would populate with records like {stock_code, Description, Quantity_remain, quantity_avail}. Those records already exist in 2 different tables in my database. The aim is that I want my program to fetch daily 10 random codes from those 2 tables bringing together the "columns" that my new custom table has +2 more editable columns: inventory, date, user with a query like this:

select top 10 stck.code, stck.descr, stck.active, stck.group_code, stck.categ_code,
stck_x_th.xwr_code, stck_x_th.thesi_code, stck_x_th.quant_remain
from stck left outer join stck_x_th on stck.code = stck_x_th.stck_code
order by newid(),

I use the the stck table to fetch product info like its code,description,group_code,categ_code, and then I outer join the stck_x_th that contains records concerning quantities remaining or available asociated with each code and "places" those quantities reside.

(those exact same columns are the ones my custom inventory table has)

store them in a datagridview control, with only one editable column -inventory-, and then when the user fills out the inventory quantites, I want to save the datagrid "as it is" in my new custom table.


I am creating a databound gridview control using one table adapter (which refers to the inventory table). Then I populate my table adapter using the forementioned query with a fillby method to populate the Datagrid (and therefore my Table in SQL) with the exact same values my query returned from the different tables. But whenever I try to update the table concurrency exceptions raise.

It works like a charm if I enter the values in the grid cells manually my self but not if I populate the grid via a query and then hit update. Any suggestions please?

I would appreciate it if you could bother posting some sample code.
Thanks in Advance
AnswerRe: SQL Application - stuck on the way I should update my Table Pin
Mycroft Holmes19-Jan-10 10:39
professionalMycroft Holmes19-Jan-10 10:39 
QuestionQuestion about simple pattern recognition (hopefully the solution is simple too...) Pin
James Shao17-Jan-10 22:24
James Shao17-Jan-10 22:24 
AnswerRe: Question about simple pattern recognition (hopefully the solution is simple too...) Pin
Mycroft Holmes18-Jan-10 11:10
professionalMycroft Holmes18-Jan-10 11:10 
GeneralRe: Question about simple pattern recognition (hopefully the solution is simple too...) Pin
Luc Pattyn18-Jan-10 11:47
sitebuilderLuc Pattyn18-Jan-10 11:47 
GeneralRe: Question about simple pattern recognition (hopefully the solution is simple too...) Pin
James Shao18-Jan-10 12:43
James Shao18-Jan-10 12:43 
AnswerRe: Question about simple pattern recognition (hopefully the solution is simple too...) Pin
i.j.russell18-Jan-10 11:48
i.j.russell18-Jan-10 11:48 
GeneralRe: Question about simple pattern recognition (hopefully the solution is simple too...) Pin
James Shao18-Jan-10 22:00
James Shao18-Jan-10 22:00 
GeneralRe: Question about simple pattern recognition (hopefully the solution is simple too...) Pin
i.j.russell18-Jan-10 23:38
i.j.russell18-Jan-10 23:38 
QuestionHow to Import many excel Files to sql server 2005? Pin
caiguosen17-Jan-10 3:31
caiguosen17-Jan-10 3:31 
AnswerRe: How to Import many excel Files to sql server 2005? Pin
Eddy Vluggen17-Jan-10 6:13
professionalEddy Vluggen17-Jan-10 6:13 
GeneralRe: How to Import many excel Files to sql server 2005? Pin
caiguosen20-Jan-10 23:49
caiguosen20-Jan-10 23:49 
GeneralRe: How to Import many excel Files to sql server 2005? Pin
Eddy Vluggen21-Jan-10 0:11
professionalEddy Vluggen21-Jan-10 0:11 
GeneralRe: How to Import many excel Files to sql server 2005? Pin
caiguosen21-Jan-10 0:58
caiguosen21-Jan-10 0:58 
GeneralRe: How to Import many excel Files to sql server 2005? Pin
Eddy Vluggen21-Jan-10 1:25
professionalEddy Vluggen21-Jan-10 1:25 
GeneralRe: How to Import many excel Files to sql server 2005? Pin
caiguosen23-Jan-10 21:50
caiguosen23-Jan-10 21:50 
GeneralRe: How to Import many excel Files to sql server 2005? Pin
Eddy Vluggen24-Jan-10 1:47
professionalEddy Vluggen24-Jan-10 1:47 
GeneralRe: How to Import many excel Files to sql server 2005? Pin
caiguosen24-Jan-10 2:05
caiguosen24-Jan-10 2:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.