Click here to Skip to main content
15,914,642 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: How do I remove the commas after reading a CSV file into a streamreader Pin
Guffa15-Dec-08 21:15
Guffa15-Dec-08 21:15 
GeneralRe: How do I remove the commas after reading a CSV file into a streamreader Pin
Tina P16-Dec-08 13:40
Tina P16-Dec-08 13:40 
GeneralRe: How do I remove the commas after reading a CSV file into a streamreader Pin
Guffa16-Dec-08 14:29
Guffa16-Dec-08 14:29 
GeneralRe: How do I remove the commas after reading a CSV file into a streamreader Pin
Tina P16-Dec-08 14:56
Tina P16-Dec-08 14:56 
GeneralRe: How do I remove the commas after reading a CSV file into a streamreader Pin
Guffa16-Dec-08 15:09
Guffa16-Dec-08 15:09 
GeneralRe: How do I remove the commas after reading a CSV file into a streamreader Pin
Tina P16-Dec-08 16:08
Tina P16-Dec-08 16:08 
GeneralRe: How do I remove the commas after reading a CSV file into a streamreader Pin
Guffa17-Dec-08 5:09
Guffa17-Dec-08 5:09 
GeneralRe: How do I remove the commas after reading a CSV file into a streamreader Pin
Tina P17-Dec-08 7:30
Tina P17-Dec-08 7:30 
Thanks a lot Guffa, I did it slightly differently but same idea.

cmd.Parameters.Add("@DATE", SqlDbType.DateTime);

for (int i = 0; i < col.Length; i += 11)
{
     cmd.Parameters["@DOW"].Value = col[i+1];
     etc.
     cmd.ExecuteNonQuery();

}


A slighly tangential question...I notice that the column name in the table in SQL server has spaces in them
lile Fuel Location, Pin Code etc. Now it looks like in C# (or even sql server if I try to do a query without
using [] square brackets around the name, it doesnt recognize it...the question is having said that do i need
these square brackets around the Values in the query and also the place where i"m setting the value of the parameter

Is this valid?
"insert into [dbo].[MyTable] ( Name,[PIN CODE],[SERVICE CENTER]) values (@Name,@[PIN CODE],@[SERVICE CENTER])

and are the following lines valid?
cmd.Parameters.Add("@[SERVICE CENTER]", SqlDbType.NVarChar, 50);

cmd.Parameters["@[Description]"].Value = col[i+2];

p.s. my concern is the use of these brackets when the actual field in a table has space in it?

Am i correct here?

Thank in advance, you have been great!

Tina
GeneralRe: How do I remove the commas after reading a CSV file into a streamreader Pin
Guffa17-Dec-08 11:52
Guffa17-Dec-08 11:52 
GeneralRe: How do I remove the commas after reading a CSV file into a streamreader Pin
Tina P17-Dec-08 14:10
Tina P17-Dec-08 14:10 
GeneralRe: How do I remove the commas after reading a CSV file into a streamreader Pin
Tina P17-Dec-08 19:37
Tina P17-Dec-08 19:37 
GeneralRe: How do I remove the commas after reading a CSV file into a streamreader Pin
Guffa26-Dec-08 7:51
Guffa26-Dec-08 7:51 
QuestionHELP! using Replace function to replace letters with images Pin
icecandy15-Dec-08 12:36
icecandy15-Dec-08 12:36 
AnswerRe: HELP! using Replace function to replace letters with images Pin
Christian Graus15-Dec-08 13:19
protectorChristian Graus15-Dec-08 13:19 
AnswerRe: HELP! using Replace function to replace letters with images Pin
treputt15-Dec-08 14:17
treputt15-Dec-08 14:17 
QuestionAssigning and retrieving values from checkboxes which are dynamically created. Pin
Member 340288615-Dec-08 10:12
Member 340288615-Dec-08 10:12 
AnswerRe: Assigning and retrieving values from checkboxes which are dynamically created. Pin
Christian Graus15-Dec-08 10:24
protectorChristian Graus15-Dec-08 10:24 
GeneralRe: Assigning and retrieving values from checkboxes which are dynamically created. Pin
Member 340288615-Dec-08 11:16
Member 340288615-Dec-08 11:16 
GeneralRe: Assigning and retrieving values from checkboxes which are dynamically created. Pin
Christian Graus15-Dec-08 11:41
protectorChristian Graus15-Dec-08 11:41 
AnswerRe: Assigning and retrieving values from checkboxes which are dynamically created. Pin
Nishant Singh15-Dec-08 17:22
Nishant Singh15-Dec-08 17:22 
QuestionGridView databinding event handler Pin
compninja2515-Dec-08 8:37
compninja2515-Dec-08 8:37 
AnswerRe: GridView databinding event handler Pin
Christian Graus15-Dec-08 15:19
protectorChristian Graus15-Dec-08 15:19 
GeneralRe: GridView databinding event handler Pin
compninja2516-Dec-08 3:05
compninja2516-Dec-08 3:05 
QuestionSeting focus for controls after postback Pin
chandra vempati15-Dec-08 8:27
chandra vempati15-Dec-08 8:27 
AnswerRe: Seting focus for controls after postback Pin
Christian Graus15-Dec-08 9:55
protectorChristian Graus15-Dec-08 9:55 

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.