Display Retrieved Records From Text File On Datagrid
I have created the file as:
Code: Open App.Path & "T1.Txt" For Append As #1 Print #1, s Close #1 I am using the following code for retrieving values:
Code: Open App.Path & "T1.Txt" For Input As #1 Do While Not EOF(1) Line Input #1, s Loop Close #1 I want to store the data in a DataGrid. How to do so?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Display Retrieved Records From Text File On Datagrid
I have created the file as:
Code:
Open App.Path & "T1.Txt" For Append As #1
Print #1, s
Close #1
I am using the following code for retrieving values:
Code:
Open App.Path & "T1.Txt" For Input As #1
Do While Not EOF(1)
Line Input #1, s
Loop
Close #1
I want to store the data in a DataGrid. How to do so?
Display Records In Datagrid And Others
HI
I want to be displayed records in datagrid. i tried it using given code but it gives error like "rowset in not bookmarkable"
rs3.Open "select * from billauto", cn, adOpenDynamic, adLockBatchOptimistic
Set DataGrid1.DataSource = rs3 ' here it gives error
datagrid1.refresh
and i want to update,delete addnew records directly from datagrid
Please help me
waiting for reply
Thanx a lot
Display Records In Datagrid
hi all,
i want to type some name in my textbox. when i start type something ( i feel in textchange itselft) the datagrid should fill with those records from the table starting with letter i typed in the text box. how can i go about. which grid control is best suit here. i need some suggestions. and the beginning code if possible.
another query is can i able to display the records of two tables in a grid
thanx in advance
saj
Display Records In Datagrid And Others
HI
I want to be displayed records in datagrid. i tried it using given code but it gives error like "rowset in not bookmarkable"
rs3.Open "select * from billauto", cn, adOpenDynamic, adLockBatchOptimistic
Set DataGrid1.DataSource = rs3 ' here it gives error
datagrid1.refresh
and i want to update,delete addnew records directly from datagrid
Please help me
waiting for reply
Thanx a lot
How Do I Use Datagrid To Display My Records In The Access DB
hi, how do i display all my record in the Access DB using a Datagrid...can anyone help me with the codes
this is my coding:
Dim SQL As String
Dim cmbRS As ADODB.Recordset
Dim Cnn As ADODB.Connection
Dim RS As ADODB.Recordset
Dim sqlstr As String
sqlstr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & App.Path & "" & DataEnteries.DBname.Text
Set Cnn = New ADODB.Connection
Cnn.Open sqlstr
SQL = "SELECT * FROM " & month.Text & ""
Set RS = New ADODB.Recordset
RS.Open SQL, Cnn, adOpenDynamic, adLockOptimistic
Set DataGrid1.DataSource = RS
got error: the rowset is not bookmarkable
Ah Xing
Display Records Into A Datagrid Or FlexGrid
Hello everybody,
I have a MS Access database and i want to see some entries from a table into a datagrid or FlexGrid from a form.
The records are not the same everytime because they depend from a SQL statement wich gets 2 variables.
When i use the datamember and datasource from the properties window i can`t see anything, but if i use an SQL statement wich doesn`t get any variables i can see the records just fine,
Does anybody knows how can i show the records into the Datagrid or the flexGrid???
I tryed the Refresh property but it doesn`t work...
When i open the SQL statement into the Form_Initialize() sub then it works just fine....
Problems Filtering Records To Display On Datagrid
I have a datagrid, command button and an ADODC bar.
I need to display filtered records from a database. I used NWIND.mdb (Access) for ease of explanation.
The filter is in sql "SelectTitle ofCourtesy, count (TitleOfCourtesy) as Quantity, Region FROM Employees Group by TitleofCourtesy"
I implement this SQL sentence in design time. I put into the ADODC1 recordsource's CommandText (SQL) ; ADODC1.CommandType = adCmdText and bind the datagrid to this ADODC1.
What I want to do is to put this record filtering during runtime. As in I want to do this in code. Can anyone help?
PS: I also have this error: "Syntax Error in FROM Clause"
Thanks in advance
Help, I'm Trying To Display 3 Million Records In A Datagrid InASP.NET
I'm trying to display 3million records in a datagrid in ASP .Net and I juct can't figure out any solution. I tried a datareader but then I woun't be able to page back and forth because its a foward only curser I also tried using a server side cursor but that only took 20min to make. I know I'm not going to be able to store the 3million in memory but I need some kind of way to scroll through the records back and forth.
How To Display Multiple Records From Different Fields In One Text Box In The Report
i have put myself into trouble by giving first name, middle name and last name options in my project. now i m finding it difficult to display these togather in the report. i know how to do it for single records . but really cann't find how to do it in case i want to display multiple records. i want to display first,middle and last as single record in the report for each displayed record.
please somebody help me
DataGrid How Add Records With Second Form With Text Boxes
I`m new in VB. And I please for help you.
I have DataGrid (MSHFlexGrid) with data in Form1. How can I adding or edit or delete concrete records (in MSHFlexGrid) with dblClick on line where is this record and with opening another form (Form2) for manage this record. So I need programm with two forms: Form1 with MSHFlexGrid for review of result and Form2 with text boxex for manage data result in MSHFlexGrid.
When is possible to tell my where I find some sample code.
Please help my.
Excuse me for my bad English.
Confirming A File Has Been Retrieved
Hey,
I was wondering if there is a way to know if a file has been copied from a directory. I have a FTP server set up and want to develope something to change a filename after it has been downloaded. Would like to avoid using the FTP log if at all possible.
Thanks for any help.
Getting File Properties Retrieved
Hi fellas,
I'm being particularly thick today.
I want to find a simple way to point to a file and get the version property info back.
ie if you hit (right click) properties on a file then goto version and read the "file version" info.
I want to do that for several files and then bung them into a label.
I'm sure its something to do with the FSO stuff but not sure how to do it...
Hope you can help!
Regards,
B
Can DataGrid Display Multiple Tooltip Text?
Can DataGrid display multiple tooltip text?
what i mean is can the data inside the grid, each display it own tooltip... or something like tooltip.... (Purpose: to help user understand the data more easier)
Thank you,
Saving A ZIP File Retrieved Through WinHTTP
Forum Members.,
I am using WinHTTP to access a website that returns data in a ZIP file.
Can some one please tell me how to receive this ZIP file and save it to
the local Hard Drive.
Thanks in Advance..
Display DBF File Into DataGrid
Hi all
i am a complete novice in database programming in VB. I have a DBF file whose location and file name is always constant. I want to display it in a form using DataGrid control. I would appreciate it very much, if someone can point me to proper codes.
thanks a lot in advance
karin
Open .csv File And Display All The Data Inside To Datagrid?
hi
what i want to do is i open .csv file and display all the data inside that .csv file to datagrid and refresh the datagrid everytime that .csv file data inside modify?
the problem i face it now display it to datagrid and refresh it?
open file it's ok for me.
thanx a lot.
When I Select In Combo Related Records Display In Grid, Few Records Are Not Displaying
I think this is the right place to post this, without knowing i place this in other discussion.
I am new.
Actually my project's Purpose [in the Form1, two combo boxes listing ItemCode and Description from two tables, where ItemCode is equal in both tables, after selecting in combo, the related record displayed in the Form2-MSHflexgrid]
Everything is working perfectly except one thing. Only three records is not displaying the details among the 1600 records
OFFICE 2000 W32 EN INT'L
MONEY 2000 W32 ENG INT'L
COMPAQ PRESARIO MV500 15" MONITO . this 3 records are in the present in the table and the ItemCode is also equal. The 3 belongs to Description field. I check through in another way, by giving the Itemcode in the first combobox, it displays correctly the details of all records. where as in the second combobox only these three is strucking up.
where as PRESARIO MV500 15" MONITOR is also a record similar to the three records but it is displaying.
I don't know this is because of any string error or something else. What's the problem, Kindly reply me.
Form_Activate()
If Form1.optItemcode.Value = True Then
sqls= "selecttab1.Itemcode,tab1.Description,tab1.Product,tab2.warehouse,tab2.Qty,tab2.Amt,tab2.Amt * 5/100 from tab1,tab2 where tab1.Itemcode=tab2.Itemcode AND tab1.Itemcode='" & Form1.cmbItemCode.Text & "'"
End If
If Form1.optDesc.Value = True Then
sqls="select tab1.Itemcode,tab1.Description,tab1.Product,tab2.warehouse,tab2.Qty,
tab2.Amt,tab2.Amt * 5/100 from tab1,tab2 where tab1.Itemcode=tab2.Itemcode AND tab2.Description='" & Form1.cmbDescription.Text & "'"
End If
rst.Open sqls, cnn, adOpenStatic, adLockReadOnly, adCmdText
If rst.RecordCount = 0 Then
Me.Hide
Form1.Show
MsgBox "No Matching RECORDS !", vbExclamation, " * Invalid Entry"
End If
because of this I am not able to finish my project. Kindly help me. My mail id is
itchocks@rediffmail.com
Thank you very much,
CHOCK.
Hai !!!
Question:Also send it to my mail ID. I did'nt get practice with forums, I don't know where to search this again.
<HTML>
<B><font color="#008000">HAVE A NICE DAY !</font></B>
<HTML>
How To Extract Records And Display Report Of Records That Are Blank
I am using the databound control in a new vb 6 program for a database of complaints. I have name , address, team, response number, open date, assigned date and completed date and some other fields that are all bound to a data2 control. I need a query that will return a report that lists all the records for a specified month (using a drop down box)with no Date_Complete (nothing entered into the field). So if the user selects March -- 2000 in two different drop down boxes. I need fields that have nothing in the Date_Completed field to print in a report. Only the records that have nothing in the Date_Complete fields should print or make the report. So the user can go back and make sure these complaints get completed. I would really appreciate the help; desperate to finish my program and it is overdue; Also, I have been using the data report feature but am open to suggestions. I don't know crystal reports at all so I need some exact and specific code here -- thanks!!!
even help w/ code using the drop down boxes to extract the data -- for example if the user select March in one drop down box and 2000 in another drop down box. I need the records that are not completed (Date_Completed) field to only show up in the report for March 2000.
How To Extract Records And Display Report Of Records That Are Blank
I am using the databound control in a new vb 6 program for a database of complaints. I have name , address, team, response number, open date, assigned date and completed date and some other fields that are all bound to a data2 control. I need a query that will return a report that lists all the records for a specified month (using a drop down box)with no Date_Complete (nothing entered into the field). So if the user selects March -- 2000 in two different drop down boxes. I need fields that have nothing in the Date_Completed field to print in a report. Only the records that have nothing in the Date_Complete fields should print or make the report. So the user can go back and make sure these complaints get completed. I would really appreciate the help; desperate to finish my program and it is overdue; Also, I have been using the data report feature but am open to suggestions. I don't know crystal reports at all so I need some exact and specific code here -- thanks!!!
even help w/ code using the drop down boxes to extract the data -- for example if the user select March in one drop down box and 2000 in another drop down box. I need the records that are not completed (Date_Completed) field to only show up in the report for March 2000.
Displaying Text File Content In A Datagrid Then Open That Text File...
I have a form named frmTest and contains a datagrid called dgData and two buttons. One is button 'Read text file' and the other one is 'open text file'. I also have a class module named CReadFile. and a textfile named test.txt
The code for button Read text file is:
Code:
Private Sub cmdReadTXT_Click()
Dim obj As CReadFile
Set obj = New CReadFile
Set dgData.DataSource = obj.Read_Text_File
Set obj = Nothing
End Sub
and the code for the open text file button is:
Code:
Open "test.txt" For Input As 1
MsgBox "file opened."
Close
The code inside the class module is:
Code:
Option Explicit
Public Function Read_Text_File() As ADODB.Recordset
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
conn.Open "DRIVER={Microsoft Text Driver (*.txt; *.csv)};" & _
"DBQ=" & App.Path & ";", "", ""
rs.Open "select * from [test#txt]", conn, adOpenStatic, _
adLockReadOnly, adCmdText
Set Read_Text_File = rs
Set rs = Nothing
Set conn = Nothing
End Function
_____________
This is what happens, if you click the button 'Read text file', the contents of the text file will be displayed in the data grid. After clicking the button 'Read text file', I now want to click the button 'Open text file' to open the text file, but an error appears saying: Run time error '70': Permission Denied.
Why is that so? What should I do to solve this problem? I need to open that file again for validation after displaying the contents.
Thank you.
How Many Records In A Text File
Hi,
I have created a file with this statment and a user defined type (udtRecord).
Open strSaveFile For Random As #1 Len = Len(udtRecord).
I can store as many records into the file as I want without problems.
What I am unsure of is how to retrieve this data, where to store the data in the program (string array?) and how many records are stored in the text file.
Here is the code
Code:
Open sSaveFile For Random As #2 Len = Len(udtRecord)
With udtRecord
Get #2, ["Unknown if I should place anything here"], iRecord
.FamilyName = DecryptData(.FamilyName, "Mz92#")
.Address = DecryptData(.Address, "Mz92#")
.City = DecryptData(.City, "Mz92#")
.State = DecryptData(.State, "Mz92#")
.PostalCode = DecryptData(.PostalCode, "Mz92#")
.DonDate = DecryptData(.DonDate, "Mz92#")
.CkNum = DecryptData(.CkNum, "Mz92#")
.PaymentMethod = DecryptData(.PaymentMethod, "Mz92#")
.TotalAmount = DecryptData(.TotalAmount, "Mz92#")
.AccountName = DecryptData(.AccountName, "Mz92#")
.Notes = DecryptData(.Notes, "Mz92#")
End With
Close #2
So I need to loop through the textfile and store the data in udtRecord somehow. Thanks for the help
Counting Records On Text File
I've got sort of a problem. The detail is long because I don't know how else to explain it...
A procedure exports an excel file to a tab text file. It then executes the CountRecords function (see below) to verify that the number of records on the text file match those from the original excel file. It seems to be doing it accurately but with one problem. In Excel the original file remains open in case the user needs to refer back to it. While executing the CountRecords code, I'm not entirely sure on why or what it is doing but the line "Cells(l, 5).Formula = .ReadLine" changes the actual original excel file (eventhough upon exporting it, excel changes the filename with the .txt extension, it changes at least what I'm viewing) so that Cells in Column 5 are equal to whatever is in .Readline (which is quite a long string). I do realize that the exported text file is not harmed, however I am weary of any changes that are made to what I see as the original Excel file.
What I'm hoping is that I can change that line to do the same thing for code progression but not affect the view of that text file in Excel. Deleting that line, causes an infinite loop.
Here's my code:
Public Function CountRecords(filepath)
Dim fs As Scripting.FileSystemObject, f As Scripting.TextStream
Dim l As Long
Set fs = New FileSystemObject
Set f = fs.OpenTextFile(filepath, ForReading, False)
With f
l = 0
While Not .AtEndOfStream
l = l + 1
Cells(l, 5).Formula = .ReadLine
Wend
.Close
End With
Set f = Nothing
Set fs = Nothing
CountRecords = l
End Function
Importing Different Records In Same Text File
Ok I have multiple text files and in each file there are different records that need to go into seperate tables. I have no Idea where to start I know its easy and I have some code written up but I am making this more complicated than it needs to be. each record starts with 3 characters such as IDN, CHG, ARR etc... and each of these characters need to be in there own table. The problem is that they are all clumped in the same text file... does anyone know where I can get code that will help me out a bit?
Edited by - MishMIke on 10/20/2004 8:35:29 AM
Import Text File To Records
Hi
I want to use VB-Code in MS Access to import several txt/dat files to records in Access. I have created a table containing 2 fields. One ID field(autonumber) and 1 data field.(Text, 80char)
How can i open a specifikk txt file, and copy each line in the txt file to 1 record in a tabel??
Anyone ??
Regards
Lars E. Nes
Display File Name In Text Box
Hi,
I am using the common dialog box control to get the file information that the user selects, but as you all know when I pass the filename to a string to display to the text box it gives me the full path name. What I want is just the filename and nothing more displayed in the file box. I cant recall whether I use instr or left or right. Could someone point me in the right direction to which function I should be looking at please. As I have seem to forgotten what the right and left is in regards to.
Many Thanks Linzy
Display Whole Text File In RTB
Hi, I'm a newbie. I would like to display ALL the contents of a text file (test.txt) in a rich text box but the top contents are scrolled off i.e. first 2 lines "123" and " " are scrolled off the top and the last line "456" is displayed in RTB. What have I done wrong? Thank you.
Here is my code:
Dim sFileDestData As String
Dim sTempD As String
sTempD = "c: est.txt"
Open sTempD For Input As #3
While Not EOF(3)
Line Input #3, sFileDestData
Viewer_dest.TextRTF = sFileDestData ' display line in rich text box
Wend
Close #3
test.txt:
123 <----- Line 1
<----- Line 2
456 <----- Line 3
Display Whole Text File?...
Hi Guys...
Can someone direct me to Display a whole text file as the .txt may have commas ',' in it.
feel a bit ashamed...
Looked in da FAQ and search for ' display whole text' to no avail...
Cheers!
---------------------------------------------------------------------------------------------------------------------------------
Todays random quote: I am still determined to be cheerful and happy, in whatever situation I may be; for I have also learned from experience that the greater part of our happiness or misery depends upon our dispositions, and not upon our circumstances.
Martha Washington (1732 - 1802)
---------------------------------------------------------------------------------------------------------------------------------
Edited by - Hopeless on 3/30/2004 4:55:57 PM
How To Count Records/Rows In A Text File
I want to use a For Next loop to process the info in a text file. To do that I think I need an upper limit number. So I want to count the number of records in the file. How can I do that. I thought something like the below would work but it didn't.
Option Explicit
Dim NumRecords As Integer
Private Sub cmdCountRecords_Click()
If Not EOF(1) Then
NumRecords = NumRecords + 1
Else
End If
picOutput.Print "Number of Records = "; NumRecords
End Sub
Private Sub Form_Load()
If Right(App.Path, 1) <> "" Then
Open App.Path & "ModifiedMIM.txt" For Input As #1
Else
Open App.Path & "ModifiedMIM.txt" For Input As #1
End If
End Sub
Count Total # Of Records In A Text File
Modified from original..................
This code gives me count. But when I click on my rc button it doubles my count. So, first click it gives me 12 (and this is correct. i only have 12 records in my file), 2nd click gives me 24, 3rd click gives me 36 and then it breaks.
Code:
Private Sub cmdRC_Click()
Dim TextLine$, Filename$
Dim FileHandle As Integer
Filename$ = "c:Test.txt"
' Test if the file exists
If Len(Dir(Filename$)) = 0 Then
'If Dir(Filename$) = "" Then
Exit Sub
MsgBox "File Not Found", vbCritical
Else
FileHandle = FreeFile ' This is safer than assigning a number
Open Filename$ For Input As #FileHandle
Do While Not EOF(FileHandle) ' Loop until end of file
Line Input #FileHandle, TextLine$ ' Read line into variable
NumRecords = NumRecords + 1
Loop
MsgBox NumRecords
Close #FileHandle
End If
End Sub
How To Count Records/Rows In A Text File
I want to use a For Next loop to process the info in a text file. To do that I think I need an upper limit number. So I want to count the number of records in the file. How can I do that. I thought something like the below would work but it didn't.
Option Explicit
Dim NumRecords As Integer
Private Sub cmdCountRecords_Click()
If Not EOF(1) Then
NumRecords = NumRecords + 1
Else
End If
picOutput.Print "Number of Records = "; NumRecords
End Sub
Private Sub Form_Load()
If Right(App.Path, 1) <> "" Then
Open App.Path & "ModifiedMIM.txt" For Input As #1
Else
Open App.Path & "ModifiedMIM.txt" For Input As #1
End If
End Sub
Reading InStream Records From Text File
Hi all,
I am trying to read in a multily occurring group from within a single
records using the textStream object in VB 6.0.
I am kind of stumped on how to go about reading the records in. I set up a
couple of arrays for the fields that are multiply occurring. Any help on
this would be greatly appreciated.
Here is the code I have so far:
Option Explicit
Public TheStreamObject As COFI_StreamObject
Dim FSys As New FileSystemObject
Private Sub ReadInputRecords()
'On Error GoTo errorhandler
Dim iFileNumIn As Integer
Dim iFileNumOut As Integer
Dim vIStream As Variant
Dim vOStream As Variant
Dim InputFile As Variant
Dim OutputFile As Variant
Dim Instream As TextStream
Dim ClaimArray()
Dim DriverArray()
Dim VehArray()
Dim VioArray()
Dim TLine As Variant
'Make sure the input file exists in destination folder
If FSys.FileExists("T:Program FilesFair IsaacDecision SystemSource
CodeVBScriptsFI_IDS_EXT.txt") = False Then
MsgBox "The Extract File 'FI_IDS_EXT.txt' does not exist.", 48,
"Error Reading File"
End
End If
InputFile = "T:Program FilesFair IsaacDecision SystemSource
CodeVBScriptsFI_IDS_EXT.txt"
Set vIStream = FSys.GetFile("T:Program FilesFair IsaacDecision
SystemSource CodeVBScriptsFI_IDS_EXT.txt")
Set Instream = FSys.OpenTextFile(InputFile, 1, False, TristateFalse)
'Loop through all records in DS input data file
Do While Instream.AtEndOfStream = False 'Not EOF(InputFile)
TLine = Instream.ReadLine
'Populate the input record with data from a single input file record
'Get #iFileNumIn, , iRecord
'TheStreamObject.CreateIStream (3660)
'Set vIStream = TheStreamObject.GetIStream
UD_PolNum = Left$(TLine, 10)
UD_PolEffDt = Mid$(TLine, 11, 8)
UD_PolExpDt = Mid$(TLine, 19, 8)
UD_PolIncDt = Mid$(TLine, 27, 8)
UD_RateState = Mid$(TLine, 35, 2)
UD_PriorPolNum = Mid$(TLine, 37, 10)
UD_VIP = Mid$(TLine, 47, 1)
UD_NumDrvrs = Mid$(TLine, 48, 2)
UD_NumVeh = Mid$(TLine, 50, 2)
UD_NumXclDrvrs = Mid$(TLine, 52, 2)
UD_LatePay = Mid$(TLine, 54, 4)
UD_NumLapse = Mid$(TLine, 58, 2)
UD_NumRemind = Mid$(TLine, 60, 2)
UD_NumAF = Mid$(TLine, 62, 2)
UD_NumNAF = Mid$(TLine, 64, 2)
UD_NumComps = Mid$(TLine, 66, 2)
UD_NumTow = Mid$(TLine, 68, 2)
UD_NumClaims = Mid$(TLine, 69, 2)
ReDim ClaimArray(UD_NumClaims)
For i = 1 To ClaimArray
UD_ClaimNum(i) = Left$(UD_ClaimSeg, 12)
UD_DrvrNum(i) = Left$(UD_ClaimSeg, 12)
UD_LossDt(i) = Left$(UD_ClaimSeg, 12)
UD_RptDt(i) = Left$(UD_ClaimSeg, 12)
UD_ClmStatus(i) = Left$(UD_ClaimSeg, 12)
UD_ClmAmt(i) = Left$(UD_ClaimSeg, 12)
UD_CAT(i) = Left$(UD_ClaimSeg, 12)
UD_Coverage(i) = Left$(UD_ClaimSeg, 12)
UD_LossT01(i) = Left$(UD_ClaimSeg, 13, 2)
UD_LossT02(i) = Left$(UD_ClaimSeg, 15, 2)
UD_LossT03(i) = Left$(UD_ClaimSeg, 17, 2)
UD_LossT04(i) = Left$(UD_ClaimSeg, 19, 2)
UD_LossT05(i) = Left$(UD_ClaimSeg, 21, 2)
UD_LossT06(i) = Left$(UD_ClaimSeg, 23, 2)
UD_LossT07(i) = Left$(UD_ClaimSeg, 25, 2)
UD_LossT09(i) = Left$(UD_ClaimSeg, 27, 2)
UD_Cause(i) = Left$(UD_ClaimSeg, 29, 2)
UD_AdjQR(i) = Left$(UD_ClaimSeg, 31, 1)
UD_Signoff(i) = Left$(UD_ClaimSeg, 32, 3)
UD_GlaccAmt(i) = Left$(UD_ClaimSeg, 35, 9)
EndFor
UD_ClaimNum = Left$(UD_ClaimSeg, 12)
UD_ClaimNum = Left$(UD_ClaimSeg, 12)
WriteDataToIStream TheStreamObject
'Set vOStream = TheRuntimeServer.ProcessRequest(vIStream)
'evaluate the output stream
If Not (vOStream Is Nothing) Then
TheStreamObject.SetCopyOfIStream vOStream
ProcessReturnStr
Records 1000K From Ascii Text File
Hi,
How to retrieve data from ascii text file which is having 1,000,000 lines or records and store data at a stretch directly in Oracle using Client to Server.
Captain
How To Write Unique Records To A Text File
I just started with VB 6.0 couple of weeks ago. I have this problem of creating a text file based on a raw data from one of our vendors. My input is a text file with duplicate cert#. How can I create a new text file with only the unique cert#?
Thank you very much for all your help.
How To Count Records/Rows In A Text File
I want to use a For Next loop to process the info in a text file. To do that I think I need an upper limit number. So I want to count the number of records in the file. How can I do that. I thought something like the below would work but it didn't.
Code:
Option Explicit
Dim NumRecords As Integer
Private Sub cmdCountRecords_Click()
If Not EOF(1) Then
NumRecords = NumRecords + 1
Else
End If
picOutput.Print "Number of Records = "; NumRecords
End Sub
Private Sub Form_Load()
If Right(App.Path, 1) <> "" Then
Open App.Path & "ModifiedMIM.txt" For Input As #1
Else
Open App.Path & "ModifiedMIM.txt" For Input As #1
End If
End Sub
Edited by - webmanoffesto on 10/6/2003 5:11:26 AM
Transfer Records From Text File To SQL Database
Hey,
I have a text file with 1000 records and 270 fields which i need to transfer it to SQL database. I want a code which can help me doing the same and not DTS.It has no delimiter.
CAn you help me ?
Thanx,
Twinkle
Display File Directory In Text Box
Is there a way to make it so when you right click on a music or video file and select 'open with' it will place the file directory in a text box? or if you double click on a file it opens in your media player and displays the file directory in a textbox. Any help please!
Thanks
Automatically Display Text File
I am making a fast text file checker that will search for all text files on my computer, look for a specific string that i put in (*@*.*), find that string in all text files, copy it, then paste it in a new text file and save it on the desktop. COmplicated to me. So far my program does the following:
On Form load it searches for *.txt files in the C: drive and displays them in a listbox.
I just need a little help on AI. I need my program to start at the top of the list, the first txt, display it in a textbox, search it for *@*.* (email address, I think that is how it would search it by), copy the address, paste it in a new txt and save it, how could I do that. Thanks
Alphabetical Display For Text File
Hey everyone!
Just for fun I would like to display my txtyachts file in alphabetical order with this Do while loop etc. any ideas?
Code:
Dim yacht As String, sum As Single, yachtCounter As Integer
picDisplay.Print Tab(15); "Current Rentals"
picDisplay.Print Tab(15); "--------------"
Open "a:Program5yachts.txt" For Input As #1
yachtCounter = 0
sum = 0
Do While Not EOF(1)
Input #1, yacht
sum = sum + yachtCounter + 1
picDisplay.Print Tab(15); yacht
Loop
Close #1
picDisplay.Print
End Sub
text file:
"Ranger-22"
"Ranger-24"
"Wavelength-24"
"Coronado-24"
"Catalina-26"
"Bayliner-24"
"Bayliner-22"
thanks
R
List Box Display Of Text File
Hi,
I am opening a file and using line input to read the file. The lines so read are displayed in a list box. I know how to display few strings in the line in a list. Now my requirement is suppose I select the line in list box it should select the full original line.
For Example:
1100150651031390 APARNA YADAV 1104850021109427TRANSWORLD SECURITIE10084803 000000000033146202753854517122007D00
This is the full line of the text file which I am reading through lineinput
Now I can display only the name,account number and amount in the list box viz
31390 APARNA YADAV 331.46
Now my requirement is suppose I click this line in list box it should display the full line which I have mentioned above in listbox2.
How Do I Get The Contents Of A Text File To Display As Is
I need to show the user the contents of a text file. Originally I tried reading it in and then writing the data to a text box but the original spacing between columns was changed. Now I am creating an OLE object which displays the file in the form of a notepad to the user who can then double click it to see the contents in notepad.exe.
I want to bypass all that and just have the contents of the file displayed with original formatting, without the user seeing a notepad to double click.
How do I do this?
Using VB To Display Text File Statistics
Am in the middle of a little quandary, I need to make a Visual Basic program to display stats for a text file. I've been told it should be able to open and close text files from disk, and as well as having sub menu headings Open, Close, Statistics and Exit, it must be able to show (from an opened file):
1. The number of times each vowel is in it (upper and lower case to be the same), and
2. The number of 1 letter, 2 letter, 3 letter, 4 letter, and 5 (and above) letter words in the file.
I have absolutely zero clue as to how to go about it.
Any help would be very much appreciated!!
Thanks for your time!
Rgds
Jason Greenwood
|