Click here to Skip to main content
16,005,138 members
Home / Discussions / C#
   

C#

 
GeneralRe: Find ASCII value Pin
Luc Pattyn21-Jun-07 9:30
sitebuilderLuc Pattyn21-Jun-07 9:30 
GeneralRe: Find ASCII value Pin
PIEBALDconsult21-Jun-07 10:32
mvePIEBALDconsult21-Jun-07 10:32 
GeneralRe: Find ASCII value Pin
stone_sks22-Jun-07 3:44
stone_sks22-Jun-07 3:44 
GeneralRe: Find ASCII value Pin
Luc Pattyn22-Jun-07 3:48
sitebuilderLuc Pattyn22-Jun-07 3:48 
GeneralRe: Find ASCII value Pin
stone_sks22-Jun-07 3:40
stone_sks22-Jun-07 3:40 
GeneralRe: Find ASCII value Pin
stone_sks21-Jun-07 8:16
stone_sks21-Jun-07 8:16 
AnswerRe: Find ASCII value Pin
Luc Pattyn21-Jun-07 8:05
sitebuilderLuc Pattyn21-Jun-07 8:05 
QuestionDGV Value Translation Pin
netizenk21-Jun-07 7:48
professionalnetizenk21-Jun-07 7:48 
Hello everyone,

Here is a scenario:

Front End:
MSVS2005 - C# - DGV

Back End:
MS SQL Server2005 - Stored Procedures

On the backend the main table contains a column named "OfficeID", tinyint, and in another table named "Offices" there are three coulmns "OfficeID", tinyint (PK); "OfficeName", nchar; and "OfficeAbb", nchar.

In my SELECT stored procedure I do an INNER JOIN of "OfficeID" columns in these two tables and display the OfficeAbb string on my front end DataGridView when I call the SELECT stored procedure instead of that tinyint stored in the main table.

This works great and DGV displays the Office Abbreviation based on the tinyint stored in the OfficeID column of the main table.

However, when I try to call my UPDATE stored procedure to update the main table I get "Failed to convert parameter value from a String to a Byte" because the DataSet now holds that two letter string office abbreviation and apparently the DataAdapter is not smart enough to lookup the Offices table and replace the string with the OfficeID tinyint for me.

I guess I either have to use some method of the DataAdapter to instruct it to translate the string into the tinyint based on the Office table values or to change the UPDATE stored procedure to where it would accept the string and than do the value translation for me. I suspect both options are possible but was unable to Google this out despite this being such a common scenario.

Any help is appreciated.

Thanks for reading,

Dean
QuestionRemote file editing using Domain admin credentials Pin
Mike Donner21-Jun-07 7:21
Mike Donner21-Jun-07 7:21 
Questiona project Pin
tarun suneja21-Jun-07 7:14
tarun suneja21-Jun-07 7:14 
AnswerRe: a project Pin
Luc Pattyn21-Jun-07 7:17
sitebuilderLuc Pattyn21-Jun-07 7:17 
AnswerRe: a project Pin
Martin#21-Jun-07 7:45
Martin#21-Jun-07 7:45 
Questionhow to determine that .NetFrameWork has been installed or not ? Pin
hdv21221-Jun-07 6:40
hdv21221-Jun-07 6:40 
AnswerRe: how to determine that .NetFrameWork has been installed or not ? Pin
Luc Pattyn21-Jun-07 6:48
sitebuilderLuc Pattyn21-Jun-07 6:48 
AnswerRe: how to determine that .NetFrameWork has been installed or not ? Pin
mav.northwind21-Jun-07 9:07
mav.northwind21-Jun-07 9:07 
AnswerRe: how to determine that .NetFrameWork has been installed or not ? Pin
Stu Richardson21-Jun-07 22:29
Stu Richardson21-Jun-07 22:29 
QuestionAccessing classes/functions in .dll added as reference Pin
lechium12121-Jun-07 6:27
lechium12121-Jun-07 6:27 
AnswerRe: Accessing classes/functions in .dll added as reference Pin
Luc Pattyn21-Jun-07 6:38
sitebuilderLuc Pattyn21-Jun-07 6:38 
GeneralRe: Accessing classes/functions in .dll added as reference Pin
lechium12121-Jun-07 6:45
lechium12121-Jun-07 6:45 
GeneralRe: Accessing classes/functions in .dll added as reference Pin
Luc Pattyn21-Jun-07 7:15
sitebuilderLuc Pattyn21-Jun-07 7:15 
GeneralC++ specific help needed Pin
lechium12121-Jun-07 7:31
lechium12121-Jun-07 7:31 
GeneralRe: C++ specific help needed Pin
Luc Pattyn21-Jun-07 7:59
sitebuilderLuc Pattyn21-Jun-07 7:59 
AnswerRe: Accessing classes/functions in .dll added as reference Pin
Dan Neely21-Jun-07 7:56
Dan Neely21-Jun-07 7:56 
Question.pdb Files Pin
Brendan Vogt21-Jun-07 6:04
Brendan Vogt21-Jun-07 6:04 
AnswerRe: .pdb Files Pin
originSH21-Jun-07 6:06
originSH21-Jun-07 6:06 

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.