Click here to Skip to main content
15,891,902 members
Home / Discussions / C#
   

C#

 
GeneralRe: Why Interface? Pin
OriginalGriff18-Oct-16 4:41
mveOriginalGriff18-Oct-16 4:41 
AnswerRe: Why Interface? Pin
Gerry Schmitz18-Oct-16 6:21
mveGerry Schmitz18-Oct-16 6:21 
JokeRe: Why Interface? Pin
Pete O'Hanlon18-Oct-16 9:20
mvePete O'Hanlon18-Oct-16 9:20 
GeneralRe: Why Interface? Pin
Gerry Schmitz18-Oct-16 20:36
mveGerry Schmitz18-Oct-16 20:36 
AnswerRe: Why Interface? Pin
Eddy Vluggen18-Oct-16 11:17
professionalEddy Vluggen18-Oct-16 11:17 
SuggestionRe: Why Interface? Pin
Richard Deeming18-Oct-16 12:21
mveRichard Deeming18-Oct-16 12:21 
GeneralRe: Why Interface? Pin
Eddy Vluggen18-Oct-16 12:36
professionalEddy Vluggen18-Oct-16 12:36 
QuestionCan't insert inkPicture into SQL Server database from C# Pin
Member 1178659318-Oct-16 0:17
Member 1178659318-Oct-16 0:17 
Actually, I am working on a Windows application and I want to add inkPicture to capture users signatures to the database. The signature column data type is varbinary. The problem is that the record is added to the database but it shows it as null only.

This is what I have done so far:
string con = "Data Source=SAIUNIFLOW;Initial Catalog=documentfollowup;Integrated Security=True";

byte[] saveInk = (byte[])axInkPicture1.Ink.Save(InkPersistenceFormat.IPF_GIF, InkPersistenceCompressionMode.IPCM_Default);

cmdDatabase = new SqlCommand();
cmdDatabase.Connection = conDatabase;

//  cmdDatabase.CommandText = "insert into manage (Signature) values(@Singature); "; 
cmdDatabase.CommandText= "insert into manage (Signature)" + "values('" +  axInkPicture1 + "'); ";

cmdDatabase.Parameters.AddWithValue("@Signature", saveInk);

Iam using tablet for getting the signatures but when I click the insert button, I receive that error:


Cannot insert the null value into column Signature, table doesn't allow nulls.

Hopefully to help me to solve this error.
AnswerRe: Can't insert inkPicture into SQL Server database from C# Pin
OriginalGriff18-Oct-16 0:22
mveOriginalGriff18-Oct-16 0:22 
AnswerRe: Can't insert inkPicture into SQL Server database from C# Pin
Richard Deeming18-Oct-16 1:49
mveRichard Deeming18-Oct-16 1:49 
GeneralRe: Can't insert inkPicture into SQL Server database from C# Pin
Member 1178659318-Oct-16 18:33
Member 1178659318-Oct-16 18:33 
GeneralRe: Can't insert inkPicture into SQL Server database from C# Pin
Member 1178659318-Oct-16 19:05
Member 1178659318-Oct-16 19:05 
GeneralRe: Can't insert inkPicture into SQL Server database from C# Pin
Richard Deeming19-Oct-16 2:07
mveRichard Deeming19-Oct-16 2:07 
QuestionRe: Can't insert inkPicture into SQL Server database from C# Pin
Eddy Vluggen19-Oct-16 3:35
professionalEddy Vluggen19-Oct-16 3:35 
QuestionConvert Char[ ] To Char ? [ ] Pin
MadDashCoder16-Oct-16 18:15
MadDashCoder16-Oct-16 18:15 
AnswerRe: Convert Char[ ] To Char ? [ ] Pin
Midi_Mick16-Oct-16 19:30
professionalMidi_Mick16-Oct-16 19:30 
AnswerRe: Convert Char[ ] To Char ? [ ] Pin
Nelson Costa Inácio18-Oct-16 4:44
Nelson Costa Inácio18-Oct-16 4:44 
QuestionUpdateProgress no disappear when i have a AsyncFileUpload control inside updatepanel Pin
whitesoul0115-Oct-16 4:26
whitesoul0115-Oct-16 4:26 
AnswerRe: UpdateProgress no disappear when i have a AsyncFileUpload control inside updatepanel Pin
Midi_Mick15-Oct-16 7:43
professionalMidi_Mick15-Oct-16 7:43 
SuggestionRe: UpdateProgress no disappear when i have a AsyncFileUpload control inside updatepanel Pin
Richard Deeming17-Oct-16 1:17
mveRichard Deeming17-Oct-16 1:17 
QuestionPrint if checkbox ticked? Pin
Member 1062775714-Oct-16 10:45
Member 1062775714-Oct-16 10:45 
AnswerRe: Print if checkbox ticked? Pin
NotPolitcallyCorrect14-Oct-16 11:39
NotPolitcallyCorrect14-Oct-16 11:39 
AnswerRe: Print if checkbox ticked? Pin
Midi_Mick14-Oct-16 14:09
professionalMidi_Mick14-Oct-16 14:09 
AnswerRe: Print if checkbox ticked? Pin
omeecode17-Oct-16 18:46
omeecode17-Oct-16 18:46 
QuestionPolymorphism Pin
Vanichandrik Suptajesacar13-Oct-16 17:00
Vanichandrik Suptajesacar13-Oct-16 17:00 

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.