Click here to Skip to main content
15,897,371 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: getting value of the textbox to be used in crystal report Pin
thatraja23-May-11 17:17
professionalthatraja23-May-11 17:17 
GeneralRe: getting value of the textbox to be used in crystal report Pin
clarence_1325-May-11 14:57
clarence_1325-May-11 14:57 
AnswerRe: getting value of the textbox to be used in crystal report Pin
thatraja25-May-11 15:50
professionalthatraja25-May-11 15:50 
GeneralRe: getting value of the textbox to be used in crystal report Pin
clarence_1325-May-11 20:02
clarence_1325-May-11 20:02 
GeneralRe: getting value of the textbox to be used in crystal report Pin
clarence_1325-May-11 20:42
clarence_1325-May-11 20:42 
QuestionPDF parser Pin
εїзεїзεїз23-May-11 9:44
εїзεїзεїз23-May-11 9:44 
AnswerRe: PDF parser Pin
Dalek Dave23-May-11 13:20
professionalDalek Dave23-May-11 13:20 
GeneralA quick question for you - preparing it Pin
TONY_R23-May-11 0:49
TONY_R23-May-11 0:49 
http://www.developerfusion.com/tools/convert/csharp-to-vb/ - csharp to vb
http://www.blackbeltcoder.com/ - adohelper class c#
http://www.daniweb.com/software-development/csharp/code/216893 bubble sort

Read file

Dim fileContent As String = File.ReadAllText(filename)

Dim integerStrings As String() = fileContent.Split(New Char() {" "c, ControlChars.Tab, ControlChars.Cr, ControlChars.Lf, ","}, StringSplitOptions.RemoveEmptyEntries)

Dim integers As Integer() = New Integer(integerStrings.Length - 1) {}

Dim IntIndx As Integer = -1

'Dim Intvalid As Boolean = False

Dim TestInt As Integer = 0

For n As Integer = 0 To integerStrings.Length - 1

Try

'Intvalid = False

TestInt = Integer.Parse(integerStrings(n))

'Intvalid = True

IntIndx += 1

integers(IntIndx) = Integer.Parse(integerStrings(n))


Catch ex As FormatException

Debug.Print("Item contains invalid characters for an Integer" & integerStrings(n))

Catch ex As OverflowException

Debug.Print("Item too Large for an Integer" & integerStrings(n))

End Try

Next

Return integers

Dim numbers As Integer() = ParseNumberFile("c:\test\infile.csv")

Console.WriteLine("No of Integers Read : " & numbers.Length)


Write file

Dim objFS As New FileStream(strFileName, FileMode.Create, FileAccess.Write)

Dim objSW As New StreamWriter(objFS)





Dim arStrings As String() = New String(arIntegers.Length - 1) {}





For fint = 0 To arIntegers.GetUpperBound(0)

arStrings(fint) = arIntegers(fint)

Next

strintegers = Join(arStrings, "|")

' Write out the record to the file ...

objSW.WriteLine(strintegers)



Console.WriteLine("Record was written to the output file.")

Console.WriteLine("")



objSW.Close()



Console.WriteLine("")

Console.WriteLine("File creation complete. Press Enter to close this window.")

Console.ReadLine()



End Sub





Dim qry As String = ""
Dim adoconnectionString As String = ""
Dim paParams() As Object = Nothing
Dim objRow As DataRow = Nothing

Dim dsData As DataSet
Dim sDescription As String = vbNullString
Using db As New AdoHelper(adoconnectionString)
dsData = db.ExecDataSet(qry, paParams)
If dsData.Tables(0).Rows.Count > 0 Then
For Each objRow In dsData.Tables(0).Rows
If Not objRow("Description") Is System.DBNull.Value Then sDescription = objRow("Description")
Next
End If
End Using
GeneralRe: A quick question for you - preparing it Pin
Dave Kreskowiak23-May-11 1:35
mveDave Kreskowiak23-May-11 1:35 
GeneralRe: A quick question for you - preparing it Pin
Luc Pattyn23-May-11 1:53
sitebuilderLuc Pattyn23-May-11 1:53 
QuestionMulti-threading a windows service in VB [modified] Pin
rguerett20-May-11 8:19
rguerett20-May-11 8:19 
AnswerRe: Multi-threading a windows service in VB Pin
Luc Pattyn20-May-11 8:33
sitebuilderLuc Pattyn20-May-11 8:33 
AnswerRe: Multi-threading a windows service in VB Pin
David Mujica20-May-11 8:36
David Mujica20-May-11 8:36 
QuestionOnly FW4 possible After new install Pin
JR21219-May-11 19:29
JR21219-May-11 19:29 
AnswerRe: Only FW4 possible After new install Pin
Dalek Dave19-May-11 21:17
professionalDalek Dave19-May-11 21:17 
GeneralRe: Only FW4 possible After new install Pin
AspDotNetDev21-May-11 12:43
protectorAspDotNetDev21-May-11 12:43 
AnswerRe: Only FW4 possible After new install Pin
AspDotNetDev21-May-11 12:40
protectorAspDotNetDev21-May-11 12:40 
QuestionAlign Long String in DataGridView Cell to Show String End Pin
Andraw Tang19-May-11 8:35
Andraw Tang19-May-11 8:35 
AnswerRe: Align Long String in DataGridView Cell to Show String End Pin
Dave Kreskowiak19-May-11 9:02
mveDave Kreskowiak19-May-11 9:02 
GeneralRe: Align Long String in DataGridView Cell to Show String End Pin
Andraw Tang19-May-11 10:15
Andraw Tang19-May-11 10:15 
AnswerRe: Align Long String in DataGridView Cell to Show String End Pin
Luc Pattyn19-May-11 9:12
sitebuilderLuc Pattyn19-May-11 9:12 
GeneralRe: Align Long String in DataGridView Cell to Show String End Pin
Andraw Tang19-May-11 10:35
Andraw Tang19-May-11 10:35 
Questionparsing .frm file for control names and nested level Pin
john john mackey17-May-11 9:27
john john mackey17-May-11 9:27 
AnswerRe: parsing .frm file for control names and nested level Pin
Dave Kreskowiak17-May-11 10:11
mveDave Kreskowiak17-May-11 10:11 
GeneralRe: parsing .frm file for control names and nested level Pin
john john mackey17-May-11 10:32
john john mackey17-May-11 10:32 

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.