Click here to Skip to main content
15,878,959 members
Home / Discussions / C#
   

C#

 
AnswerRe: .Net 1.1 to .Net 2.0 Pin
WillemM1-May-06 22:20
WillemM1-May-06 22:20 
QuestionInt to string Pin
Rmokkenstorm1-May-06 21:35
Rmokkenstorm1-May-06 21:35 
AnswerRe: Int to string Pin
WillemM1-May-06 22:21
WillemM1-May-06 22:21 
GeneralRe: Int to string Pin
Rmokkenstorm1-May-06 22:25
Rmokkenstorm1-May-06 22:25 
AnswerRe: Int to string Pin
J4amieC1-May-06 23:22
J4amieC1-May-06 23:22 
AnswerRe: Int to string Pin
Guffa1-May-06 23:25
Guffa1-May-06 23:25 
GeneralRe: Int to string Pin
Rmokkenstorm1-May-06 23:38
Rmokkenstorm1-May-06 23:38 
AnswerRe: Int to string Pin
Josh Smith2-May-06 1:43
Josh Smith2-May-06 1:43 
The ConnectionString property returns a string. You cannot index into a string with a string value...

// Bad
dBANBM_T075_BORGTOCHTTableAdapter.Connection.ConnectionString[":PARAM3"] = "%";

As the compiler error told you, you have to index into the string with an integer (a whole number).

// Better
dBANBM_T075_BORGTOCHTTableAdapter.Connection.ConnectionString[4] = '%';

Most likely what you are trying to achieve is something like this:

// Best
string val;
if( textBox2.Text != string.Empty ) 
   val = textBox2.Text;
else
   val = "%";

dBANBM_T075_BORGTOCHTTableAdapter.Connection.ConnectionString = dBANBM_T075_BORGTOCHTTableAdapter.Connection.ConnectionString.Replace( ":PARAM3", val );

Josh
GeneralRe: Int to string Pin
Rmokkenstorm2-May-06 2:43
Rmokkenstorm2-May-06 2:43 
GeneralRe: Int to string Pin
Josh Smith2-May-06 4:21
Josh Smith2-May-06 4:21 
GeneralRe: Int to string Pin
Rmokkenstorm2-May-06 4:34
Rmokkenstorm2-May-06 4:34 
Questionassigning Values to a resized string Array Pin
abhinish1-May-06 20:50
abhinish1-May-06 20:50 
AnswerRe: assigning Values to a resized string Array Pin
akyriako781-May-06 21:01
akyriako781-May-06 21:01 
Questiongraphics Pin
cshivaprasad1-May-06 20:42
cshivaprasad1-May-06 20:42 
AnswerRe: graphics Pin
CWIZO1-May-06 21:14
CWIZO1-May-06 21:14 
GeneralRe: graphics Pin
cshivaprasad1-May-06 21:19
cshivaprasad1-May-06 21:19 
GeneralRe: graphics Pin
CWIZO1-May-06 21:23
CWIZO1-May-06 21:23 
GeneralRe: graphics Pin
cshivaprasad1-May-06 21:32
cshivaprasad1-May-06 21:32 
GeneralRe: graphics Pin
CWIZO1-May-06 21:35
CWIZO1-May-06 21:35 
GeneralRe: graphics Pin
cshivaprasad1-May-06 23:41
cshivaprasad1-May-06 23:41 
GeneralRe: graphics Pin
CWIZO1-May-06 23:45
CWIZO1-May-06 23:45 
GeneralRe: graphics Pin
cshivaprasad2-May-06 0:08
cshivaprasad2-May-06 0:08 
QuestionDerived CollectionBase Class overwriting previous entries. Pin
Steven_Henley1-May-06 20:24
Steven_Henley1-May-06 20:24 
QuestionWebBrowser / HtmlElement Class Help Pin
joetoday1-May-06 19:32
joetoday1-May-06 19:32 
AnswerRe: WebBrowser / HtmlElement Class Help Pin
leppie1-May-06 20:25
leppie1-May-06 20:25 

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.