Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
GeneralRe: programticly scroll a richtextbox Pin
Heath Stewart30-Dec-04 20:06
protectorHeath Stewart30-Dec-04 20:06 
Generalusing non true type or open type fonts Pin
Tyrus18230-Dec-04 14:43
Tyrus18230-Dec-04 14:43 
Questionwhat is wrong here ? Pin
kings_130-Dec-04 11:38
kings_130-Dec-04 11:38 
AnswerRe: what is wrong here ? Pin
Heath Stewart30-Dec-04 12:06
protectorHeath Stewart30-Dec-04 12:06 
GeneralRe: what is wrong here ? Pin
kings_130-Dec-04 19:46
kings_130-Dec-04 19:46 
GeneralRe: what is wrong here ? Pin
Heath Stewart30-Dec-04 20:01
protectorHeath Stewart30-Dec-04 20:01 
GeneralRe: what is wrong here ? Pin
kings_131-Dec-04 0:59
kings_131-Dec-04 0:59 
GeneralRe: what is wrong here ? Pin
Heath Stewart31-Dec-04 6:10
protectorHeath Stewart31-Dec-04 6:10 
Because you didn't set the type for parm1, most likely. You need to assign the values using the appropriate type, which means you need to convert lbCartisNum.Text to an integer value.

It's hard to tell, though. It does work, though: thousands of people use it every day. You didn't post the exception being thrown, so how can I know exactly what's wrong? You need to be more specific about your problems, like posting the exception message and type (like System.Data.OleDb.OleDbException and that it returned "couldn't cast to the appropriate type", or something like that).

The following may work - but again this is without knowing what your actually problem is since you didn't tell me:
cmd.Parameters.Add("@TeorBohen", OleDbType.VarChar, 80).Value = RbTeorBohen.Text;
cmd.Parameters.Add("@CartisNum", OleDbType.Integer).Value = int.Parse(lbCartisNum.Text);
Since you assigned text to parm1.Value then the value would've been quoted in the resultant command before being executed, meaning that it wasn't representing a number but instead a string containing the number.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: what is wrong here ? Pin
kings_131-Dec-04 7:15
kings_131-Dec-04 7:15 
GeneralRe: what is wrong here ? Pin
Heath Stewart31-Dec-04 8:05
protectorHeath Stewart31-Dec-04 8:05 
GeneralHidden Window Screenshot Pin
eggie530-Dec-04 10:21
eggie530-Dec-04 10:21 
GeneralRe: Hidden Window Screenshot Pin
Heath Stewart30-Dec-04 11:53
protectorHeath Stewart30-Dec-04 11:53 
GeneralRe: Hidden Window Screenshot Pin
eggie530-Dec-04 16:40
eggie530-Dec-04 16:40 
GeneralRe: Hidden Window Screenshot Pin
Heath Stewart30-Dec-04 19:51
protectorHeath Stewart30-Dec-04 19:51 
Generalgenerate a random number of the bignumber Pin
asmyan30-Dec-04 9:18
asmyan30-Dec-04 9:18 
GeneralRe: generate a random number of the bignumber Pin
Heath Stewart30-Dec-04 9:45
protectorHeath Stewart30-Dec-04 9:45 
GeneralRe: regarding dundas evaluation version Pin
Heath Stewart30-Dec-04 9:14
protectorHeath Stewart30-Dec-04 9:14 
GeneralSorry for asking such a question Pin
asmyan30-Dec-04 17:29
asmyan30-Dec-04 17:29 
GeneralRe: Sorry for asking such a question Pin
Heath Stewart30-Dec-04 19:53
protectorHeath Stewart30-Dec-04 19:53 
GeneralRe: regarding dundas evaluation version Pin
Nick Parker30-Dec-04 9:40
protectorNick Parker30-Dec-04 9:40 
GeneralProblem running release build on non-development machine Pin
rahmanasdf30-Dec-04 7:16
rahmanasdf30-Dec-04 7:16 
GeneralRe: Problem running release build on non-development machine Pin
Nick Parker30-Dec-04 7:22
protectorNick Parker30-Dec-04 7:22 
GeneralRe: Problem running release build on non-development machine Pin
Ray Cassick30-Dec-04 11:14
Ray Cassick30-Dec-04 11:14 
GeneralRe: Problem running release build on non-development machine Pin
Uwe Keim30-Dec-04 20:48
sitebuilderUwe Keim30-Dec-04 20:48 
GeneralRe: Problem running release build on non-development machine Pin
rahmanasdf2-Jan-05 5:21
rahmanasdf2-Jan-05 5:21 

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.