Click here to Skip to main content
15,881,812 members
Home / Discussions / C#
   

C#

 
GeneralRe: DataGridTextBoxColumn.WidthChange to trigger method Pin
Roger Stewart25-Aug-03 7:25
professionalRoger Stewart25-Aug-03 7:25 
GeneralRe: DataGridTextBoxColumn.WidthChange to trigger method Pin
mikemilano25-Aug-03 7:48
mikemilano25-Aug-03 7:48 
QuestionC# Profiling?!? Pin
Alberto Bencivenni25-Aug-03 5:37
Alberto Bencivenni25-Aug-03 5:37 
AnswerRe: C# Profiling?!? Pin
leppie25-Aug-03 8:38
leppie25-Aug-03 8:38 
GeneralRe: C# Profiling?!? Pin
Anonymous25-Aug-03 10:22
Anonymous25-Aug-03 10:22 
GeneralRe: C# Profiling?!? Pin
Alberto Bencivenni25-Aug-03 10:40
Alberto Bencivenni25-Aug-03 10:40 
GeneralNewby Application.StartupPath Problem Pin
GostWryter25-Aug-03 3:06
GostWryter25-Aug-03 3:06 
GeneralRe: Newby Application.StartupPath Problem Pin
David Stone25-Aug-03 4:58
sitebuilderDavid Stone25-Aug-03 4:58 
My advice: Change this line:
strConn += " Data Source=" + Application.StartupPath + "\\foo.mdb;";

To this:
strConn += " Data Source=" + Path.Combine(Application.StartupPath, "foo.mdb") + ";";


And as another point, you should probably use the System.Text.StringBuilder class instead of just concatenating strings. So then you would do something like this:

StringBuilder sb = new StringBuilder();
//Build the rest of your string here using the Append and AppendFormat methods
sb.AppendFormat(" Data Source={0};", Path.Combine(Application.StartupPath, "foo.mdb"));


That'll replace the {0} with the path to your mdb file. And the best part is that you can have as many parameters as you want. I would definitely read up on the StringBuilder class if I were you. It's a much more efficient way of creating strings that need to be dynamic.




I passionately hate the idea of being with it, I think an artist has always to be out of step with his time.
-Orson Welles

GeneralRe: Newby Application.StartupPath Problem Pin
GostWryter26-Aug-03 2:01
GostWryter26-Aug-03 2:01 
Generaljava Word maker help required Pin
seunao25-Aug-03 1:43
seunao25-Aug-03 1:43 
GeneralRe: java Word maker help required Pin
Julian Bucknall [MSFT]25-Aug-03 10:25
Julian Bucknall [MSFT]25-Aug-03 10:25 
GeneralRe: java Word maker help required Pin
Ista25-Aug-03 15:20
Ista25-Aug-03 15:20 
GeneralCombo Box in ToolBar Pin
azusakt24-Aug-03 23:33
azusakt24-Aug-03 23:33 
GeneralRe: Combo Box in ToolBar Pin
Furty25-Aug-03 5:42
Furty25-Aug-03 5:42 
GeneralRe: Combo Box in ToolBar Pin
Ista25-Aug-03 15:28
Ista25-Aug-03 15:28 
GeneralRe: Combo Box in ToolBar Pin
Nick Parker25-Aug-03 17:40
protectorNick Parker25-Aug-03 17:40 
GeneralRe: Combo Box in ToolBar Pin
Ista25-Aug-03 17:43
Ista25-Aug-03 17:43 
GeneralRe: Combo Box in ToolBar Pin
Nick Parker25-Aug-03 18:31
protectorNick Parker25-Aug-03 18:31 
GeneralRe: Combo Box in ToolBar Pin
Ista26-Aug-03 3:26
Ista26-Aug-03 3:26 
GeneralObject reference not set to an instance of an object. Pin
HJo24-Aug-03 23:16
HJo24-Aug-03 23:16 
GeneralRe: Object reference not set to an instance of an object. Pin
Roger Stewart25-Aug-03 7:43
professionalRoger Stewart25-Aug-03 7:43 
GeneralRe: Object reference not set to an instance of an object. Pin
HJo25-Aug-03 20:30
HJo25-Aug-03 20:30 
QuestionHow to save/load stream(such as image) to/from database? Pin
xfqiu24-Aug-03 22:46
xfqiu24-Aug-03 22:46 
AnswerRe: How to save/load stream(such as image) to/from database? Pin
Mazdak25-Aug-03 3:03
Mazdak25-Aug-03 3:03 
GeneralRunning webpage Pin
deanoA24-Aug-03 22:14
deanoA24-Aug-03 22:14 

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.