Click here to Skip to main content
15,915,851 members
Home / Discussions / C#
   

C#

 
QuestionHelp: Invalid Parameter Used error Pin
nudma12-Aug-08 4:08
nudma12-Aug-08 4:08 
AnswerRe: Help: Invalid Parameter Used error Pin
Rashmi_Karnam12-Aug-08 4:28
Rashmi_Karnam12-Aug-08 4:28 
GeneralRe: Help: Invalid Parameter Used error Pin
nudma12-Aug-08 6:03
nudma12-Aug-08 6:03 
GeneralRe: Help: Invalid Parameter Used error Pin
Rashmi_Karnam13-Aug-08 4:04
Rashmi_Karnam13-Aug-08 4:04 
GeneralRe: Help: Invalid Parameter Used error Pin
nudma13-Aug-08 4:36
nudma13-Aug-08 4:36 
GeneralRe: Help: Invalid Parameter Used error Pin
Rashmi_Karnam13-Aug-08 9:57
Rashmi_Karnam13-Aug-08 9:57 
GeneralRe: Help: Invalid Parameter Used error Pin
nudma14-Aug-08 4:43
nudma14-Aug-08 4:43 
QuestionString or binary data would be truncated. The statement has been terminated. Pin
laziale12-Aug-08 3:47
laziale12-Aug-08 3:47 
hi guys! I have a problem with the sql exception what I am getting while I am trying to upload a PDF file in a database. I have set the field for the document to be varbinary(MAX) so I will not have any problems with the size, but the exception says that my file is over the limit and I am getting this message when I am trying to update the table, at the last line of the code. Here is the code:

SqlConnection conn = new SqlConnection(some connection);
                   conn.Open();
                   SqlDataAdapter da = new SqlDataAdapter("Select * FROM Table", conn);
                   SqlCommandBuilder MyCB = new SqlCommandBuilder(da);
                   DataSet ds = new DataSet("Table");
                   da.MissingSchemaAction = MissingSchemaAction.AddWithKey;
                   FileStream fs = new FileStream(@"C:\\PDFdocument"+"\\" + PDF, FileMode.OpenOrCreate, FileAccess.Read);
                   byte[] myData = new byte[fs.Length];
                   fs.Read(myData, 0, System.Convert.ToInt32(fs.Length));

                   fs.Close();
                   da.Fill(ds, "Table");

                   DataRow myRow;
                   myRow = ds.Tables["Table"].NewRow();
                   myRow["Document"] = myData;
                   myRow["ID"] = fileID;
                   ds.Tables["Table"].Rows.Add(myRow);
                   da.Update(ds, "Table");



how I can solve this issue? Thx ahead
AnswerRe: String or binary data would be truncated. The statement has been terminated. Pin
vikas amin12-Aug-08 5:28
vikas amin12-Aug-08 5:28 
Questionrowchanged event and update error Pin
catborise12-Aug-08 3:10
catborise12-Aug-08 3:10 
AnswerRe: rowchanged event and update error Pin
catborise13-Aug-08 1:53
catborise13-Aug-08 1:53 
QuestionNeed Help Calling A Fortran 77 (.for) DLL Pin
Nitusa12-Aug-08 3:03
Nitusa12-Aug-08 3:03 
QuestionRegistering to an event on a wcf web service Pin
Lior Zat12-Aug-08 2:37
Lior Zat12-Aug-08 2:37 
AnswerRe: Registering to an event on a wcf web service Pin
c242312-Aug-08 3:47
c242312-Aug-08 3:47 
GeneralRe: Registering to an event on a wcf web service Pin
Lior Zat13-Aug-08 20:17
Lior Zat13-Aug-08 20:17 
Questionhow can i resolve System.Collections.ListDictionaryInternal Pin
koolprasad200312-Aug-08 2:26
professionalkoolprasad200312-Aug-08 2:26 
AnswerRe: how can i resolve System.Collections.ListDictionaryInternal Pin
leppie12-Aug-08 2:30
leppie12-Aug-08 2:30 
Questionenumeration of Active Sockets Pin
damcg12-Aug-08 2:07
damcg12-Aug-08 2:07 
AnswerRe: enumeration of Active Sockets Pin
leppie12-Aug-08 2:28
leppie12-Aug-08 2:28 
GeneralRe: enumeration of Active Sockets Pin
damcg12-Aug-08 3:01
damcg12-Aug-08 3:01 
GeneralRe: enumeration of Active Sockets Pin
leppie12-Aug-08 3:12
leppie12-Aug-08 3:12 
GeneralRe: enumeration of Active Sockets Pin
damcg12-Aug-08 3:55
damcg12-Aug-08 3:55 
QuestionIntermittent Code behind Errors in C#.net Pin
AnuVM12-Aug-08 1:53
AnuVM12-Aug-08 1:53 
AnswerRe: Intermittent Code behind Errors in C#.net Pin
Christian Graus12-Aug-08 1:57
protectorChristian Graus12-Aug-08 1:57 
QuestionURL escape issue Pin
George_George12-Aug-08 1:13
George_George12-Aug-08 1:13 

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.