Click here to Skip to main content
16,006,442 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Open File Pin
amaneet25-Sep-06 6:44
amaneet25-Sep-06 6:44 
AnswerRe: Open File Pin
Dave Kreskowiak25-Sep-06 6:59
mveDave Kreskowiak25-Sep-06 6:59 
QuestionI need Vb.net code to search from database, its for a Procurement company project Pin
lynnmagunje25-Sep-06 0:50
lynnmagunje25-Sep-06 0:50 
AnswerRe: I need Vb.net code to search from database, its for a Procurement company project Pin
User 171649225-Sep-06 1:58
professionalUser 171649225-Sep-06 1:58 
QuestionI need Vb.net code to search from database, its for a Procurement company project Pin
lynnmagunje25-Sep-06 0:48
lynnmagunje25-Sep-06 0:48 
QuestionVB.net File Find and Replace Memory intensive! Pin
MichaelWithersone25-Sep-06 0:07
MichaelWithersone25-Sep-06 0:07 
AnswerRe: VB.net File Find and Replace Memory intensive! Pin
Christian Graus25-Sep-06 0:22
protectorChristian Graus25-Sep-06 0:22 
GeneralRe: VB.net File Find and Replace Memory intensive! Pin
MichaelWithersone25-Sep-06 0:56
MichaelWithersone25-Sep-06 0:56 
  Dim stylesDataSet As DataSet<br />
        Dim stylesDataTable As DataTable<br />
        Dim stylesDataRow As DataRow<br />
<br />
        Dim tempDataSet As DataSet<br />
        Dim tempDataTable As DataTable<br />
        Dim tempDataRow As DataRow<br />
<br />
<br />
        Dim stylesCounter As Int16<br />
        Dim token As String<br />
        Dim replaced As String<br />
        Dim SQLEval As String<br />
        Dim oFile As System.IO.File<br />
        Dim oRead As System.IO.StreamReader<br />
        Dim oWrite As System.IO.StreamWriter<br />
        Dim EntireFile As String<br />
<br />
        Dim SQL As String<br />
        'SQL = "EXEC tokenReplaceListExec <<CustomerID>>,<<ClientID>>,0,'" & paths("StyleFolder") & "','," & fileName & "'"<br />
        SQL = "EXEC tokenReplaceList <<CustomerID>>,<<ClientID>>,0,'" & paths("StyleFolder") & "'"<br />
        SQL = queryTokeniser(SQL)<br />
<br />
        stylesDataSet = ExecuteDataTable(SQL)<br />
        stylesDataTable = stylesDataSet.Tables(0)<br />
        stylesCounter = 0<br />
<br />
        oRead = oFile.OpenText(fileName)<br />
        EntireFile = oRead.ReadToEnd()<br />
        oRead.Close()<br />
<br />
<br />
<br />
<br />
<br />
        EntireFile = Replace(EntireFile, vbCrLf, "")<br />
<br />
        If Debug_Status = 1 Then<br />
            oWrite = oFile.CreateText(fileName & ".test")<br />
            oWrite.Write(EntireFile)<br />
            oWrite.Close()<br />
        End If<br />
<br />
<br />
        fileFindAndReplace(fileName, vbCrLf, "")<br />
        TOCReplace(fileName)<br />
<br />
        Do While stylesCounter < stylesDataTable.Rows.Count<br />
            stylesDataRow = stylesDataTable.Rows(stylesCounter)<br />
            token = stylesDataRow("token")<br />
            If Not stylesDataRow("Eval") Is System.DBNull.Value Then<br />
                SQL = stylesDataRow("Eval")<br />
                SQL = queryTokeniser(SQL)<br />
                tempDataSet = ExecuteDataTable(SQL)<br />
                tempDataTable = getLastTable(tempDataSet)<br />
                tempDataRow = tempDataTable.Rows(0)<br />
                replaced = tempDataRow.Item(0)<br />
            Else<br />
                If Not stylesDataRow("replacement") Is System.DBNull.Value Then<br />
                    replaced = stylesDataRow("replacement")<br />
                Else<br />
                    replaced = ""<br />
                End If<br />
            End If<br />
<br />
<br />
            EntireFile = Replace(EntireFile, token, replaced)<br />
            stylesCounter = stylesCounter + 1<br />
        Loop<br />
<br />
<br />
<br />
<br />
<br />
        oWrite = oFile.CreateText(fileName)<br />
        oWrite.Write(EntireFile)<br />
<br />
        oWrite.Close()<br />


Hope this helps , iam basically using string = replace(string,find, replace)
AnswerRe: VB.net File Find and Replace Memory intensive! Pin
Guffa25-Sep-06 2:38
Guffa25-Sep-06 2:38 
GeneralRe: VB.net File Find and Replace Memory intensive! Pin
MichaelWithersone25-Sep-06 4:12
MichaelWithersone25-Sep-06 4:12 
Questionupdate app.config file at runtime Pin
steve_rm24-Sep-06 23:49
steve_rm24-Sep-06 23:49 
AnswerRe: update app.config file at runtime Pin
Christian Graus25-Sep-06 0:34
protectorChristian Graus25-Sep-06 0:34 
QuestionRe: update app.config file at runtime Pin
steve_rm25-Sep-06 1:20
steve_rm25-Sep-06 1:20 
AnswerRe: update app.config file at runtime Pin
TJO125-Sep-06 2:35
TJO125-Sep-06 2:35 
QuestionRe: update app.config file at runtime Pin
steve_rm25-Sep-06 3:20
steve_rm25-Sep-06 3:20 
AnswerRe: update app.config file at runtime Pin
Dave Kreskowiak25-Sep-06 4:58
mveDave Kreskowiak25-Sep-06 4:58 
AnswerRe: update app.config file at runtime Pin
TJO126-Sep-06 2:26
TJO126-Sep-06 2:26 
Question[Message Deleted] Pin
PREMSONBABY24-Sep-06 23:13
PREMSONBABY24-Sep-06 23:13 
AnswerRe: Hi, this is a Treeview related question Pin
Dave Kreskowiak25-Sep-06 4:55
mveDave Kreskowiak25-Sep-06 4:55 
Questionwat is VCNT in vb6? Pin
campbells24-Sep-06 21:30
campbells24-Sep-06 21:30 
AnswerRe: wat is VCNT in vb6? Pin
Dave Kreskowiak25-Sep-06 4:35
mveDave Kreskowiak25-Sep-06 4:35 
Questionhow to open a wizard in vb.net Pin
Batchu Rajesh24-Sep-06 21:18
Batchu Rajesh24-Sep-06 21:18 
AnswerRe: how to open a wizard in vb.net Pin
Christian Graus24-Sep-06 21:28
protectorChristian Graus24-Sep-06 21:28 
QuestionArraylist Linking Pin
Cymru-am-Byth24-Sep-06 21:05
Cymru-am-Byth24-Sep-06 21:05 
AnswerRe: Arraylist Linking Pin
Christian Graus24-Sep-06 21:08
protectorChristian Graus24-Sep-06 21:08 

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.