Click here to Skip to main content
       

C#

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
QuestionHow can i save data from word table to SQL database C#memberNkeshe14 Jan '13 - 2:16 
Hi I have created a word document where user fill in details. Now i want to save those details when the user close the word document.
 
Thank you in advance
AnswerRe: How can i save data from word table to SQL database C#mvpEddy Vluggen14 Jan '13 - 3:15 
Using an UPDATE statement, to update the database. You'd use an IDbConnection to connect to the database, and use a IDbCommand to execute the SQL-statement.
 
Post some code if you're stuck, or get a good introductionary book if you don't know where to begin.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]
They hate us for our freedom![^]

QuestionReading jpeg image from a binary datamembercoolprasadhegde14 Jan '13 - 0:44 
Hi,
How to read a jpeg image from the binary data in a file in C#? Here, image is stored as a bindary data in the file.Now i need to construct a image from this data.
AnswerRe: Reading jpeg image from a binary datamvpOriginalGriff14 Jan '13 - 0:53 
Assuming that the data is a Jpeg file, just stored as binary:
     byte[] bytes = File.ReadAllBytes(path);
     MemoryStream ms = new MemoryStream(bytes);
     Image returnImage = Image.FromStream(ms);
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.

GeneralRe: Reading jpeg image from a binary datamembercoolprasadhegde14 Jan '13 - 20:38 
Thanks Griff..But this gives "Argument Exception" saying parameter is not valid.
GeneralRe: Reading jpeg image from a binary datamvpOriginalGriff14 Jan '13 - 21:03 
Then I suspect that the data is not a jpeg file - what are you trying to do? Not "read a file as an Image, but what is the file? Why are you reading it? What are you trying to achieve? It may be that one of use is using the wrong terms! Laugh | :laugh:
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.

QuestionCapturing windows messagesmemberDainer Mesa Lima13 Jan '13 - 19:45 
I need help on how to capture windows messages. Smile | :)
AnswerRe: Capturing windows messagesmvpSandeep Mewara13 Jan '13 - 20:23 
Following article should help you learn how to do it: Trapping windows messages[^]
Sandeep Mewara
Microsoft ASP.NET MVP 2012 & 2013
 

[My Latest Article(s)]:
How to extend a WPF Textbox to Custom Picker
Server side Delimiters in ASP.NET

AnswerRe: Capturing windows messagesprotectorPete O'Hanlon13 Jan '13 - 23:29 
What technology are you using? Windows Forms or WPF? If you're using WinForms, there's an implicit WndProc that you can add your code into. If it's WPF, things get a little more complicated as you have to add your own WndProc handler.

*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

"Mind bleach! Send me mind bleach!" - Nagy Vilmos

CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

QuestionSqlConnection vs IDbConnectionmemberlevanduyet_vn13 Jan '13 - 15:40 
Dear All,
I have used SqlConnection to connection to Sql database. There are some friends, they always use IDbConnection. He also suggest me use IDbConnection. I also see some of project here using IDbConnection: AccountPlus[^]
 
_ What's the difference bettwen SqlConnection and IDbConnection.
_ Using IDbConnection is better?
 
Tks,
 
LVD

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


Advertise | Privacy | Mobile
Web03 | 2.6.130523.1 | Last Updated 24 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid