Multiple Entries In 1 Text Box
I need help doing something with a text box. Heres the situation... I have a command that brings a text box visible to the form. I then want the user to input say "5" into the text box... and then hit a command that says add which takes that number to a label called total... then if the user has another number to put into the text box, the first one entry deletes after the add command is pushed and the user can put another entry in the same text box. Say the number is "4", then the add command is pushed again deleting the "4" and adding it to the 5 previously in the label. Can somebody help me with pseudo code?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Multiple Text Box Entries On Form To Array
Can anyone help. I have multiple text boxes on a form, and I want the code to go through each text box and put the text in to a 2D array.
The text boxes are created after the user input the number of verticies, 2 verticies creates 4 text boxes done with this code
Private Sub Form_Load()
Dim ctlName As Control
Dim TBox_name As String
Dim Tbox_value As String
Dim i As Integer
Dim Top As Integer
i = 0
Top = 500
TBox_name = "Text"
For i = 0 To Verticies - 1
Tbox_value = CSng(i + 1)
TBox_name = TBox_name + Tbox_value
Set ctlName = Form4.Controls.Add("VB.TextBox", TBox_name, Form4)
ctlName.Visible = True
ctlName.Top = Top * (i + 1)
ctlName.Left = 500
ctlName.Width = 700
ctlName.Height = 200
Tbox_value = CSng(i + 2)
TBox_name = TBox_name + Tbox_value
Set ctlName = Form4.Controls.Add("VB.TextBox", TBox_name, Form4)
ctlName.Visible = True
ctlName.Top = Top * (i + 1)
ctlName.Left = 1700
ctlName.Width = 700
ctlName.Height = 200
Next
Form4.Height = (Top * (i + 1)) + 500
End Sub
Thanks for your help.
Iain
Multiple Entries Into Workbook
I have multiple workbooks writing to a single excel workbook. There will be instances where 2+ people attempt to write and save to the same cell. At the moment I have set it up so that when the single book is saved if it is read only (someone else has it opened) it will give an error (because it is read only) it then pauses for between 0-2 seconds, opens the single book again and writes to the next available cell.
Should i be looking into sharing the single workbook?
If so where can i find a good guide on conflict resolution.
Any thoughts would be appreciated.
Using Modules With Multiple Entries
hi
I'm a complete novice, so I hope my question is worded vlear enough....
I'm wondering exactly how to get multiple objects inside a class module and refer back to them later.
This data will be read from a disk before being put into the class list in the form IDnumber, firstname, and lastname for each student on the list.
I have heaps of examples of one object within the class eg one student with the above details but how do I add a second and subsequent students to this list?
And how do I then, say, store 1 value from all of them eg their ID number to a combo box and refer back to the rest of the information on the student when their ID is selected?
Thanks for any help you can give.... I'm hitting my head against the wall for answers
AO
Delete Multiple Entries
I need to delete old entries from a SQL table where the PhoneNumberID value is the same as a newer entry. So if there were 3 entries in the table that had PhoneNumberID as 1009, the oldest entries would be deleted, and only the newest one kept.
The AssignDate field is where the date value is stored, but I can't come up with the query.
Code:
DELETE FROM [Calls] WHERE [PhoneNumberID] = ??This is where I'm stuck
SQL isn't my strong suit. Could anyone help me out?
Viewing Multiple Entries From A DB
Hi,
I would like to view multiple entries from a database simultaniously. I have would like to view up to 20 entries with four fields each at one time. I know that I could simply add many more fields and then just have my display textboxes linked to those different fields, but there must be a easier way. Any help is appreciated.
Search And Replace Multiple Entries
Can anyone help with the following problem?
I'm trying to standardise various country names found in a column of data.
At the moment I'm reduced to using the following cumbersome code for - in this example - converting USA and United States of America to United States:
sub replace()
Columns("P:P").Select
Selection.Replace What:="USA", Replacement:="United States"
Selection.Replace What:="United States of America", _ Replacement:="United States"
End Sub
Is there a way of not repeating every line for every replacement word? I've tried using OR but the syntax is wrong. It will obviously work doing it this way but I can't imagine it's very efficient.
Any ideas...???
thanks
Lookup Multiple Identical Entries
One column contains coding that relates to various vendors. Another column has dollar sums relating to the same vendors. I want to sum the totals from each vendor by adding the totals pertaining to each code. I assume there is a way to loop a lookup function, but I am not sure if that is the smartest way, nor do I know how to do it.
Any help?
Catching Multiple Entries In Access
My VB program connects to an access database. This code takes a .csv file and imports it into the database (I found the first method in this forum). The function that I wrote is my problem. It is suppose to check to see if a value is allready in the table. It works for some values but not others. I am thinking that there might be a better way to check this, mabye an access error handler for primary key constraints.
Code:
Private Sub importCSV(filename As String)
Set Con = New ADODB.Connection
Set rs = New ADODB.Recordset
Con.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" + gStrDb + ";"
sSQL = "select * from Package"
rs.CursorLocation = adUseClient
rs.LockType = adLockOptimistic
rs.CursorType = adOpenKeyset
rs.Open sSQL, Con
Open filename For Input As #1
intInput = 0
Do Until EOF(1)
Line Input #1, strL
strF = Split(strL, ",")
If Not multIndex(strF(0)) Then
intInput = intInput + 1
rs.AddNew
rs!trackingNum = strF(0)
rs!dateShip = CDate(strF(1))
rs.Update
End If
Loop
Close #1
rs.Close
Con.Close
End Sub
Private Function multIndex(str As String) As Boolean
'this function checks to see if a record has been entered
Dim bol As Boolean: bol = False
If Not rs.EOF Then
rs.MoveFirst
counter = 0
Do While Not rs.EOF
strRsIndex(counter) = rs!trackingNum
rs.MoveNext
counter = counter + 1
Loop
Dim I As Integer
For I = 0 To counter
If str = strRsIndex(I) Then
bol = True
End If
Next
End If
multIndex = bol
End Function
Multiple Database And Email Entries
Hi
I have a little problem that you may be able to help on......
I have just re-coded my website to do the following :
Take user details via a form >> Submit them to a DB update page >> This then submits to an email creation page >> this then goes to a "Thank you for your booking" page.
All this works fine until the website visitor clicks their browsers back button.
If they click back once it sends me another email
If they click back twice it posts to the database again and then sends me another email.
Therefore at the moment I am getting 5-6 emails for each form/booking submission from the website.
I have been trying to find info about resetting all variables when it reaches the last page, closing and re-opening the browser (probably bad idea) or disabling the back button !!
Any ideas on what I can do to get round this problem ??
Cheers for any help/ideas.
Giles
Multiple Entries In Components Manager
Has anyone experienced this problem before?
I have the same control that now has 10 entries in the components manager. The big problem is that I work on the project from two computers and they don't recognise that it is the same control and when I load the project I get errors and the controls of that type are either deleted or converted to picture boxes.
I've tried a suggestion by MarkT to use regclean but it didn't work. Anyone else have any idea to the cause and how to resolve it?
I have the .ocx file located in the same location on the two computers.
C:windowssystem32.
Finding Multiple Entries In Textbox
Hi everyone ...
Just a test project for me to learn on. I am trying to loop through a textbox, finding each instance of a letter entered into a second textbox. I can get the loop to work, but I am stumped on the output. I want it to change a labels caption to " the search string was found at positions:
1
3
5
etc.
If I step through the code it does show each instance of the found string but it only shows one, not all. also if the string being searched does NOT end with the letter(s) I am trying to find, then it ends up showing "search not found"
Here is my code so far
Code:
Private Sub Command1_Click()
Dim sInput As String, sFind As String
Dim iFound As Integer
Dim iCounter As Integer
sInput = Text1
sFind = Text2
For iCounter = 1 To Len(sInput)
iFound = InStr(iCounter, sInput, sFind, vbTextCompare)
If iCounter = 1 And iFound = 0 Then
Label1.Caption = "Search not found"
Exit Sub
Else
Label1.Caption = "The search string was found at Position :" & iFound
End If
Next iCounter
End Sub
Also, if someone has a "cleaner" way of writing this, please provide it so i can try to learn more.
Thanks
Michael
Multiple Line ListBox Entries
I was wondering if it is possible to have ListBox entries that take up more than one line, and if so, what would be the easiest way to do this. Any suggestions would be appreciated!
-Thanks,
Yguy123
Eliminate Multiple Entries An An Array
I have an array as follows :
a(0) = "f"
a(1) = "a"
a(2) = "b"
a(3) = "c"
a(4) = "a"
a(5) = "b"
a(6) = "d" etc The size of the array is appr 70000
Many values are repeats ( a and b ) in the above sample.
How can I create an array which would contain only
f,a ( but only once ) b ( only once ) c and d
Thanks
Generate Multiple Entries To Table
I am using the following code to generate a serial# on a form. What I have been asked to do now is to try and see if I can add a qty field to the form and for whatever amount (say 50) is entered, create that many serial#'s....can this be done? Here is the code I am currently using...thanks
Private Sub Command11_Click()
Dim MyDate, MyYear, MyWeek, MyDay, MyNumber As Integer
Dim Ret As String
Dim Test As Variant
MyDate = Date
MyYear = Format(Date, "yy")
MyWeek = Format(DatePart("ww", MyDate, vbUseSystemDayOfWeek, vbUseSystem), "00")
MyDay = Format(DatePart("w", MyDate, vbUseSystemDayOfWeek, vbUseSystem), "0")
Ret = "V" & MyYear & MyWeek & " " & MyDay
Test = DMax("[number]", "TABLE1", "number like '" & Ret & "*'")
If IsNull(Test) Then
Ret = Ret & " 001"
Else
MyNumber = CInt(Right(Test, 3)) + 1
Select Case MyNumber
Case Is < 10
Ret = Ret & " 00" & CStr(MyNumber)
Case Is < 100
Ret = Ret & " 0" & CStr(MyNumber)
Case Else
Ret = Ret & " " & CStr(MyNumber)
End Select
End If
Forms!Form1!Serial = Ret
End Sub
Which Is The Best Grid Option For Multiple Entries
hi friends i want to know that which is the best option for multiple entries at a time like msflexgrid which we can use it by moving text box but it is quite complicated and time consuming any other option any one can give, which is very flexible And also with all common events, waiting for replies
Saving Multiple Combo Box Entries To File
Hello, for the past little while, i've been trying to save my combo box entried to a file so that the next time I run my program the entries will still be there. Should I use a combo box or listbox? How do I go about reading/writing multiple entries from a combo box?
My scenario is a program for a restaurant, the users will all be added into the computer, which then their names will be displayed in a combo box. I don't wanna keep adding the same users everytime my programs starts. I want my program to read a file and automotically input them into the combo box..
your help will be greatly appreciated,,
thanks
I Get A Multiple Entries In Control Panel When Installing
As the title says, whenever I make a new version of a program I made, and install it, I get like "App name", "App name #1", "App name #2" etc... since I did not check that before I have like 8 of them... the program overrides the previous exe file, so that is only one, but I have 8 uninstall logs, and 8 entries in Control Pannel's Add/Remove programs...
I use "Package & Deployment Wizard" to make the setup...
So... my question is: How can I make the setup override the previous one, and have only one entry in Add/Remove programs ?
Package && Deployment Wiz / Multiple Uninstall Entries
Using the VB 6 (SP 4) P&D Wizard to create a setup. Inoticed that if you run the setup multiple times (without uninstalling the app first) you will get multiple entries in the Add/Remove Applications control panel applet. It looks something like this:
XYZ App
XYZ App (C:Program FilesXYZ App)
XYZ App (C:Program FilesXYZ App)
...etc. for as many times as you run the setup...
Has anyone encountered this, and more importantly how to prevent it from happening...
Thanks,
Drag && Drop Multiple List Entries
When a listbox's Multiselect property is set to Extended how do you drag multiple items? If you start moving with the mouse button down, you just select more entries.
Reading Multiple Entries From A Single Textbox??
ive got a simple project to complete for programming 101, and it just isnt working out for me.
thats the basic idea of the assignment.
i have to enter multiple numbers seperated by a space, and using the input, to determine the largest/second largest numbers accompanied by the number of occurances.
all to be done without using arrays.
i know that there is alot of VB veterans on here, and im hoping someone will be able to help me out.
Edited by - AddyC on 12/1/2003 5:35:03 PM
Stopping Multiple Entries From Appearing In A Combo Box????
Hi all,
I am trying to get a combo box to display entries from an access database. I have gotten it to display the field I want but it displays the name multiple times. What I have is a prgram that writes exceptions to a database. I then have a program(the one in question) to view the entries in the database and once viewed store them but do not view them again. So the problem that I am encountering is that when a user enters multiple entries to the database it will list thier name once for each entry. I just want it to display thier name once letting me know that they have made an entry to the database not how many time they have. Is there someway to search the database just to get the name from this field only once instead of every occurence of it in this field? If so can you please give me some sample code so I can see how it works then I can adjust mine to work. thank you for all the help in advance. Here is some of the code to get an Idea of what i am trying to do.
Code:
Private Sub cmbMan_Click(Index As Integer)
If cmbMan(0).Text = rSOne.Fields("manager") Then
rSOne.MoveFirst
Do Until rSOne.EOF = True
If IsNull(rSOne.Fields("Employee")) Then
rSOne.Fields("Employee") = ""
Else
cmbEmp(1).AddItem rSOne.Fields("Employee")
End If
rSOne.MoveNext
Loop
rSOne.MoveFirst
Else
MsgBox "You have no exceptions at this time. Please select another name or Try again at a later time. Thank you!!"
cmbEmp(1).Text = ""
End If
End Sub
How To Write A Query To Select Multiple Entries
Hi Techies,
First i will explain u the criteria. Assume a table with 6 rows and 4 columns. Each and every cell is having a text box whose value is going to be fetched from the backend database.(SQL Server). Simillaryly the data's enter/modified here should go to the backend.
Now my question is "Do i have to write individual query to fetch/update data's for all the cells or is there is any other way to do". It involves fields from Multiple tables
Please assume that the tables are EMP,DEPT, EMPSAL
Looking forward your help in this regards
Thanks,
Karthik
Removing Duplicates For Multiple Entries In A Data Validation
Dear All,
I have a list that can allow multiple entries to be entered on a separate line within a cell. But i want to make sure that once an entry has been entered, it will not allow the similar one to be entered again the the same cell.
i tried hiding but it only works if i have the values in different rows.
Anyone has any idea how i can avoid duplicate entries with this?
i have attached the file.
Many help is appreciated.
Book1.zip
Saving Multiple Master-detail Entries On Single Save Button Press
i have a master detail form :
1. i m showing master items in a flexgrid named as fgMaster
2. i m showing detail items in another flexgrid named as fgdetail
problem is that when i select a single item from master grid first i have to generate a series of some user defined target like genrate 10 unique detail codes against tht seleted item then i enter different values against that item. i didn't press save button yet, user select another item from fgmaster and generate another series of unique codes and enter different values aginst that item.
i have to store all these inforation and at last when user press Save button i have to enter all those entries item wise.
i m facing difficulties to store and retrieve these information before saving..
ur immediately reply would be very helpful to me
thnks to every body
Text Entries
This is what i have so far
Code:
Open "edittext.txt" For Output As #1
Open "originaltext.txt" For Input As #2
x = 1
Do While Not EOF(1)
Input #2, UserName, UserID
If Not NewUser.User.Selected(nIndex) = UserName Then
Write #1, UserName, UserID
End If
x = x + 1
Loop
Close #1
Close #2
It doesn't write anything to text.txt , can anyone tell me what is going on??
Also, how do i rename edittext.txt to originaltext.txt. I think i have to kill originaltext.txt first.
Text Box Entries
I have put several Text Box's on a Form and assigned this as Text in the Text Box's property sheet "[- Available -]". When I try to Type something in th TextBox it won't do it nothing Happens. Do I have to erase what's in the Box and Then Type or What?
Saving Text Box Entries
Is there a way to save the entry in a text box so that the next time the user form is entered the text that was entered the last time appears in the text box?
For example, when my VBA user form pops up I ask for the company name and their website which they enter into a text box. Is there a way for that information to be there when they open the word document in the future?
Thanks.
Mike
Textbox Entries To Show Latest Appended Entries.
How do set a textbox to show the latest appended entry? When data is appended to a text box it always resets to the top of the window. To view the appended data one must scroll down. I would like to keep the latest viewable. Any ideas, please?
Saving Text Entries In UserForms
I am using VBA in Reflection, a terminal emulator software. I am building a UserForm to replace a series of input boxes that the user is currently being prompted for. The input boxes have code to save the last entry in the box so that the user does not have to re-enter the same data every time. Is there a way to use code for each text box in a UserForm to store the last entered data, until the user changes it?
Thanks
To Check For Blank Entries In A Text Box
Hi friends
First of all let me introduce myself, I am Peters A P. I just started learning VB.
I have a question regarding the following
I have a form, where I want to enter alphanumeric values in the text box and then it should update to the database.
The form has around 25 text boxes, out of which I need to enter complusorily for 10 textboxes. How do I check that and give an error message if I forget to enter one value in one textbox.
I am pasting part of codes below, here I am checking for text1.box whether it is blank, similarly, i need to check for 9 more text boxes. How do I do that
Private Sub cmdSave_Click()
Dim contactrec As New ADODB.Recordset
contactcon.Open "smmdetails"
Set contactrec = contactcon.Execute("Select * from smm_details")
If contactrec.BOF = True Then
If txtBox1.Text = "" Then
MsgBox "Please enter Name of the Firm"
Else
contactcon.Execute ("insert into smm_details(name_of_company, type_of_business, ho_address, ho_city, ho_country, " & _
"ho_tel_no_1, ho_tel_no_2, ho_fax_no_1, ho_fax_no_2, ho_email_1, ho_email_2, ho_website, ho_contact_person, ho_contact_person_mobile, " & _
"local_address, local_city, local_country, local_tel_no_1, local_tel_no_2, local_fax -no, local_email, local_contact_person, local_contact_person_mobile, " & _
"sponsor_name, sponsor_tel_no_1, sponsor_tel_no_2, sponsor_fax_no_1, sponsor_mobile_no, sponsor_email, owner_name, owner_tel_no_1, owner_mobile_no, " & _
"owner_passport, owner_nationality, owner_passport_expiry) Values('" & txtBox1.Text & "')")
End If
Else
MsgBox "Record Already Exists"
End If
contactrec.Close
End Sub
Reverse Entries In A Text File
Hi all..
I have a program I wrote that outputs abnormal program activity to a text file.
Example: Say user tries to choose a non-existant path:
message= "Path error encountered."
Goes to a sub called logme:
sub logme
open "errorlog.txt" for append as #1
print #1, message
close 1
Pretty simple I know.
But what if I wanted to limit the errorlog.txt file size to 100 entries?
Is there a simple way to delete entry #1 when entry #101 is made?
Currently program counts the number of lines in the file before writing to it. If over 100 then it copies everything except entry #1 to another file (erorlog.tmp). It then adds entry 101 to errorlog.tmp.
It then deletes errorlog.txt, renames errorlog.tmp to errorlog.txt. This results in 100 entries, first in-first out.
There has got to be a cleaner way to do this, and I know you are the guys to ask.
Thanks.
Find Previous Entries In Text Box
You know guys how on internet explorer if you previously have entered a string in a text box it remembers every value that has been entered before in that text box and gives you the list. For instance if you are trying to login to a website you start typing your user name. Let's say my user name is hespinoza. If I type "h" then in the list will appear all entries begining with "h" If I type "e" then the list will filter its contents and only display values that start with "he" Does anyone has something that would help me figure this thing out?
Thanks a bunch.
Changing From "FindFirst" To Selecting From Multiple Entries
Hello --
I am designing a phone list that is able to search and offer a selection
from multiple entries rather than using "FindFirst." My search options
include by first name, last name, extension, and division, so you can see my
problem. If anyone has a suggestion, code, or reference to an archived
posting, please let me know.
Thanks,
Erica Bennett
Senior Library Technician
Cypress College Library
Removing Duplicate Entries In A Text File
I have an email list that has an email address on each line. The problem is that some emails appear more than once in the file.
I'd like to parse out the dups and create a file of non-dups and a file of all the dups
here' the code I have and it sure isn't working. Maybe my brain isn't working right today
Code:
set objFS=CreateObject ("Scripting.FileSystemObject")
set listFile = objFS.OpenTextFile ("BADEMAILS.txt")
set listFile1 = objFS.OpenTextFile ("BADEMAILS1.txt")
set logfile = objFS.CreateTextFile("Final-Removed.txt")
set logfile1 = objFS.CreateTextFile("Final-Removed-dups.txt")
count = 1
do while listFile.AtEndOfStream <> True
line1 = listFile.ReadLine
count1 = 1
listFile1.open
do while listFile1.AtEndOfStream <> True
line2 = listFile1.ReadLine
if line1 <> line2 then
logfile.writeline line2
else
logfile1.writeline line2
end if
count1 = count1 + 1
Loop
listFile1.close
count = count + 1
Loop
BADEMAILS.txt and BADEMAILS1.txt are identical. The only way I could think is to open one file and walk down each line while looping through a different file with the same content parsing out the dups?
Any help would be appreciated
Thanks
Deleting Double Entries In Text Files. How To?
hello,
I have a text file with the following information:
name, address, phone number
I want to use vb to delete entries with the same name, so I would
have only the latest updated information about that name.
how can I do this with vb?
thanks
Remove Duplicate Entries From Text File....
hi, say i have a textbox with numbers like this:
345
645
878
8978
585
64
3
56
how would i make a program which removes duplicate entries from the textbox? i've more or less got a similar bit of code working which works for a listbox, but i'm kinda stuck with how to do it on a textbox. can anyone help?
[solved] Sorting Entries In Text Files
foe example i have a text file named mydbs.txt
the entries inside it are
anything 12.00
others 65.65
helpme 56.76
anyone 96.65
schizo 44.44
how do i get the entries to be sorted where the highest entry is on the top of the file...
Print Text Box Entries To Seperate .txt File
I am very new to VB and am currently trying to work out how to copy each answer from a text box into a .txt file. For instance name and address details. Can anyone help ?
Thanx in advance,
Putting Text File Entries Into An Array
Hey all!
OK, what I want to do is put a whole bunch of names into an array from a text file. The names are already in correct order, all I want to do is get entry #1 into label #1, entry #2 into label #2 etc. How do I do this?
This is what I've got, but I know it doesn't work.
Code:
Private Sub Form_Load()
Dim Name as String, i as String
Open "c:lennycollingwoodfilesPlayers.txt" For Output As #1
For i = 1 To 52
Input #1, Name
lblPlayer(i).Caption = Name
Name = ""
Next i
End Sub
Thanks in advance for any help you can offer.
Deleting Duplicate Entries In A Text File
okay here is my code...i can load the file and add to it and close it and i know how to check for duplicate items, but how can i delete the duplicate entry....
private Sub Form_Load()
Dim Temp as string
lstClient.Clear ' clear current entries
Open "C:
ame.txt" for input as #1
Do Until EOF(1)
Line input #1, Temp
lstClient.AddItem Temp
Loop
Close #1
lblDisplay.Caption = lstClient.ListCount
End Sub
private Sub cmdClose_Click()
Dim X
Open "C:
ame.txt" for Output as #1
for X = 0 to lstClient.ListCount - 1
print #1, lstClient.List(X)
next X
Close #1
Unload me
End Sub
thanx in advance
midnight service
Need A Code That Alowes Entries In Text Boxes To Be Saved
Hi,
I am very new to VB..
I'm hoping some of you might be able to help me make a code to apply in text boxes made in MS Word 2000..
I have made a document with several text boxes, and saved it as a web page.
When I open the document in IE, I can add text in the boxes, and print it out.
What I would like is to be able to save the webpage with the entered text still in the boxes...
When I save now, and reopen, the boxes are empty..
Any hints?
Brgds André
Collect The Entries Made In A Text Box In A Variable After Each Execution
code for the following steps
1.Declare a variable globally say Var_NEW
2.Store the value in a text field in the variable Var_NEW everytime with a terminating string like ‘;’
3.For Ex: if the text is entered for first time, then the variable holds like VAR_DSN=<FIRST_NAME>; second time VAR_DSN=<FIRST_NAME>;<SECOND_NAME>;
Deleting Double Entries In Text Files. How To? *Not Solved*
I tried with no success to delete double entries in a text file.
I'll explain, I have a text file with the following information:
name, address, phone number
I want to use vb to delete entries with the same name, so I would
have only the latest updated information about that name.
previous help also did not work...
http://www.vbforums.com/showthread.p...hreadid=304157
so I'm still not in my happy place...
any help?
Reading Time IN And Time Out From Multiple Entries
im currently working on a project where i would retrieve the data from an existing database (MS Access) used by another program (Time and Attendance with Finger Scan attached), what im trying to do is create a program where the routine of retrieving the data throwing it to another database for manipulation would seem like realtime. i had no problem reading and saving it in this approach except that in some cases it might give an incorrect data
1 - read all Time IN and save it to the target database (delete Time OUT if Time IN exist)
2 - read all Time OUT and save it to the target database aligned to the closest Time IN (with no Time OUT)
it works fine but im was wondering if theres another way or a better way to approach this, since the said approach might give incorrect data if ever one person forgot to Time IN or Time OUT, this wouldnt be a problem if the source has the data aligned but since the entries for both Time IN and Time OUT is on different entries aligning it makes it harder
source database structure:
Employee Code (text) | Action Flag - Time IN/Time OUT (boolean/int) | Date (date) | Time (time)
target database structure:
Employee Code (text) | Time IN (datetime) | Time OUT (datetime)
any thoughts is appreciated!
Search/Replace In Text File Based On Database Entries.
I'm writing an application to take a text file and run a find and replace function on the text based on some entries in a database. Say you have a text file that is comprised of thousands of lines that are formatted pretty similarly (comma delimited). I want it to read through the lines and every time it comes across the Product type of Equifax Infile, to change the Category to Developed Report. And for all Products that are undefined (else) the Category should be set to Developed Report. The categories and products are saved in a database that is editable by the user. The Product table contains a foreign key to link to the Category table so as to create a one-to-many relationship. As I am pretty new to the whole programming world, any help anyone could provide would be appreciated. I have sample code and text file if you would like. Please let me know if you have any ideas for this function. Thank you very much for your help.
|