Click here to Skip to main content
15,881,424 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: What is := in VB.net Pin
Bongumusa4-Sep-08 5:52
Bongumusa4-Sep-08 5:52 
QuestionSpecial Characters in XML Pin
Zaegra27-Aug-08 1:30
Zaegra27-Aug-08 1:30 
AnswerRe: Special Characters in XML Pin
Manas Bhardwaj27-Aug-08 1:37
professionalManas Bhardwaj27-Aug-08 1:37 
QuestionError in XHTTP: the system cannot locate the resource specified Pin
WinCrs27-Aug-08 0:53
WinCrs27-Aug-08 0:53 
QuestionGetting Session value Pin
sumit703426-Aug-08 23:46
sumit703426-Aug-08 23:46 
AnswerRe: Getting Session value Pin
Guffa27-Aug-08 1:13
Guffa27-Aug-08 1:13 
QuestionHow to save use DataGridView tool to Sql Server DB Pin
Francis K Antony26-Aug-08 23:38
Francis K Antony26-Aug-08 23:38 
QuestionProblem With my.Computer.FileSystem.WriteAllText Pin
Ramana Nori26-Aug-08 23:27
Ramana Nori26-Aug-08 23:27 
Hi,

I'm trying to save a dataset contents in a .csv or text file. The following code I've written.
My problem is "my.Computer.FileSystem.WriteAllText("d:\testcsv.csv", str.ToString, False)" in this line "my" is showing error always saying "my" is not declared. How to solve this problem.


Imports System.Text
Imports System.Data
Imports System.IO




Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

Dim str As New StringBuilder

SqlDataAdapter1.Fill(DataSet11)

For Each dr As DataRow In Me.DataSet11.stockm

For Each field As Object In dr.ItemArray

str.Append(field.ToString & ",")

Next

str.Replace(",", vbNewLine, str.Length - 1, 1)

Next



Try

my.Computer.FileSystem.WriteAllText("d:\testcsv.csv", str.ToString, False)

Catch ex As Exception

MessageBox.Show("Write Error")

End Try

End Sub
AnswerRe: Problem With my.Computer.FileSystem.WriteAllText Pin
Manas Bhardwaj27-Aug-08 1:39
professionalManas Bhardwaj27-Aug-08 1:39 
GeneralRe: Problem With my.Computer.FileSystem.WriteAllText Pin
Ramana Nori27-Aug-08 1:40
Ramana Nori27-Aug-08 1:40 
AnswerRe: Problem With my.Computer.FileSystem.WriteAllText Pin
Dave Kreskowiak27-Aug-08 2:16
mveDave Kreskowiak27-Aug-08 2:16 
QuestionAuto Hide Task Bar Pin
rajesh_ncc26-Aug-08 22:35
rajesh_ncc26-Aug-08 22:35 
AnswerRe: Auto Hide Task Bar Pin
Zaegra27-Aug-08 1:37
Zaegra27-Aug-08 1:37 
GeneralRe: Auto Hide Task Bar Pin
rajesh_ncc27-Aug-08 4:06
rajesh_ncc27-Aug-08 4:06 
QuestionCPU Usage History from Task Manager using vb.net Pin
pavanip26-Aug-08 20:19
pavanip26-Aug-08 20:19 
AnswerRe: CPU Usage History from Task Manager using vb.net Pin
jzonthemtn27-Aug-08 5:10
jzonthemtn27-Aug-08 5:10 
QuestionWrite all URL in to a file used in the browser Pin
yesu prakash26-Aug-08 18:16
yesu prakash26-Aug-08 18:16 
AnswerRe: Write all URL in to a file used in the browser Pin
Jon_Boy27-Aug-08 4:01
Jon_Boy27-Aug-08 4:01 
QuestionComputer Name and IP Addresses Pin
programmervb.netc++26-Aug-08 8:20
programmervb.netc++26-Aug-08 8:20 
AnswerSolve it with scripting Pin
David Mujica26-Aug-08 9:32
David Mujica26-Aug-08 9:32 
GeneralRe: Solve it with scripting Pin
jzonthemtn26-Aug-08 15:06
jzonthemtn26-Aug-08 15:06 
QuestionVB.NET to respond to change of sheet in excel? Pin
craigmg7826-Aug-08 8:04
craigmg7826-Aug-08 8:04 
AnswerRe: VB.NET to respond to change of sheet in excel? Pin
John_Adams26-Aug-08 11:30
John_Adams26-Aug-08 11:30 
JokeRe: VB.NET to respond to change of sheet in excel? Pin
Bassam Saoud26-Aug-08 11:52
Bassam Saoud26-Aug-08 11:52 
GeneralRe: VB.NET to respond to change of sheet in excel? Pin
craigmg7827-Aug-08 9:27
craigmg7827-Aug-08 9:27 

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.