Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 10th, 2003, 07:24 AM
Battery Powered Battery Powered is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 164 Battery Powered User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 20 m 3 sec
Reputation Power: 11
Finished something but cant search it

Hi

Ive included something ive been working on, its a cencus return form
Ive commented it where i can so hopefully easy to follow

It uses an index file for the 9 pointer values

Ive got it to read / write to the files it needs to

Now all im trying to do is add a search option
So if someone has the three option boxes set to who they want to search for and click 'search' im trying to get it to perform the search and return the results in the txt box next to it

Hope someone can help, if its easier i can paste the code of the form in here,
Thanks alot everyone
Attached Files
File Type: zip u18.zip (2.9 KB, 663 views)

Reply With Quote
  #2  
Old March 10th, 2003, 10:22 PM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed God (5000 - 5499 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 5,163 Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 6 Days 1 h 34 m 20 sec
Reputation Power: 791
Ok, I did a little playing around with your program. I didn't understand what you were doing with the index bytes. They just seem to be a random assignment since they are reassigned each time the form is closed and is in other places.

I did some re-writing to the program but it does what you want it to. You may want to play with it some, since I didn't do a lot of performance and error handling tweaking in it, but it works.

It will add, search, and refill the text boxes on a search that is double-clicked.

Maybe it is what you were wanting.
Attached Files
File Type: zip u18.zip (3.6 KB, 695 views)

Reply With Quote
  #3  
Old March 11th, 2003, 02:55 AM
Battery Powered Battery Powered is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 164 Battery Powered User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 20 m 3 sec
Reputation Power: 11
Hi

Im looking at what youve done and it looks all good

But when i try and save a record this line produces an error:

strSegments = Split(strRecord, "|") 'explode the string into segments

The error i get is a Compile Error (Sub or function not defined)
(which it highlights the 'Split' word on occurance)

Many thanks for your help


[Edit: Alot of lines seemed to be commented when they look like they shoudnt be, is this correct? ]

Last edited by Battery Powered : March 11th, 2003 at 02:59 AM.

Reply With Quote
  #4  
Old March 11th, 2003, 07:59 AM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed God (5000 - 5499 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 5,163 Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 6 Days 1 h 34 m 20 sec
Reputation Power: 791
What service pack are you running for vb? If you don't have the latest, I would recommend that you get that one.

Yes, the lines that are commented out are there for a reason. In some cases I didn't see the relevance, it others they weren't necessary. For the most part what is commented out is the index byte sections. I really don't understand quite what you are doing here since you couldn't reverse the data to get the information from it with the manner that you were doing so I commented it out and re-wrote it in a way that you could easily reverse it.

The Split function is part of the vb language so I would check your service pack to make sure. I didn't alter your project properties at all so it should work correctly. I have service pack 5 installed.

Reply With Quote
  #5  
Old March 11th, 2003, 08:06 AM
Battery Powered Battery Powered is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 164 Battery Powered User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 20 m 3 sec
Reputation Power: 11
The challenge set to me was to use an index file, and in that file have a pointer for the last record for that group
So that by looking in the index file would show you the last record, and then that record would show you the one before that one and so on

If that makes any sense : )

Reply With Quote
  #6  
Old March 11th, 2003, 08:21 AM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed God (5000 - 5499 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 5,163 Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level)Onslaught User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 6 Days 1 h 34 m 20 sec
Reputation Power: 791
Ok, that makes sense enought, but here is the thing. The index file should be associated with the record sequence number, not the cencus record data values. This way you can retrieve the data and actually decifer it. Your original method would not allow for this. All you need to do now is as the record is being written, write to the index file it's sequence number, then you have an account of what records were put in, although it will still just be a running number. This also allows you to change one of the functions to make it quicker in the long run. The function that retrieves the record count could be changed to look that the index file and increment the last number it retrieves and that should be the next sequence number used.

Also, if this is homework, then I suggest that you go to your instructor and/or classmates for help before coming to this forum.

Reply With Quote
  #7  
Old March 11th, 2003, 08:34 AM
Battery Powered Battery Powered is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 164 Battery Powered User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 20 m 3 sec
Reputation Power: 11
Yes I am a student, but this is not college related

and i dont have these services packs you mentioned so im gonna update myself and see where it takes me : )

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Finished something but cant search it

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap