View Poll Results: Would you hire based on my sample project?

Voters
8. You may not vote on this poll
  • Shows some promise!

    5 62.50%
  • Hit the Books!

    3 37.50%
Results 1 to 37 of 37

Thread: Would you hire me......

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    Well hello people I am going for my first interview to be a VB programmer tomorrow and I would like to get some professional opinion on my sample project that I will be presenting to the interviewer, it is basically something that I have put together to show my skills in VB/ Access programming, so if you will have a look and tell me if you would hire based on my work, and if not please give me some feedback on what I can do better. Any input is much appreciated. This sample Uses DAO and was written in VB5.
    Attached Files Attached Files
    {Insert random techno-babble here}

    {Insert quote from some long gone mofo here}

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913

    re:

    As far as presentation of code and keeping of standards you did very well. My one question if Iwas employing you , would be do you know ADO or would you be willing to learn it? Skills in ADO would look better to a knowledgable interviewer. And remember, it isnt always WHAT you know, its what you have the ability to know!

    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    Definitely willing to learn ADO, I'm just stuck with VB5 at the moment. Are the differences that much where it will take an extreme amount of studying to learn or is the switch relatively painless?
    {Insert random techno-babble here}

    {Insert quote from some long gone mofo here}

  4. #4
    New Member
    Join Date
    Jan 2001
    Location
    Stevenage uk
    Posts
    2
    Very good!

    just 2 points:
    Use strSQL rather than sSQL, as it will just show a bit more knowledge, and give the impression you've been doing this for a longer time - str is the 3 letter abreviation for string, which is the proper way of coding.
    There's a couple of other parts like the plist where you coul have written in the 3 letter abreviation too (like lst short for listbox).

    Secondly, keep code relatively close together, we all have spaces in our coding, but if the code is of the same tyoe (i.e. all in a with statement, then keep all this together, a bit like sentences & paragraphs -
    Code:
            With pList
        
                .Clear
            
                .AddItem "Breads"
                .AddItem "Dairy"
                .AddItem "Dry Goods"
                .AddItem "Fruits"
                .AddItem "Meats"
                .AddItem "Non-Food"
                .AddItem "Vegetables"
            
            End With
    could be better as:
    Code:
            With pList
                .Clear
                .AddItem "Breads"
                .AddItem "Dairy"
                .AddItem "Dry Goods"
                .AddItem "Fruits"
                .AddItem "Meats"
                .AddItem "Non-Food"
                .AddItem "Vegetables"   
            End With
    Andytdb
    Wassup/Ze Germans/Do You know what nemisis means

  5. #5
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    I do not fully agree with you Andytdb.

    I think it's just a matter of preference if you use strSQL or sSQL, it has nothing to do with your capabilities or whatsoever.

    Also I don't think it's better to compact code.
    If you think it's readable, read it that way.

    Ofcourse, if you're going to work in a team, it's important you make a protocol on what standards to use.

    I don't think they accept/decline you on base of a few spaces more or less.
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  6. #6
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913

    re:

    Its not really any harder than DAO. I mean it is a bit diferent, but if you can do DAO, you can do ADO. i think the only major difference is the settting up of a connection string that tells teh engine what type of database it is, the location of the database file, and any login stuff. This isnt reallt accurate but it wold look something like this

    dim rs as ADODB.REcordset
    Conn = "Driver=Access;Database="c:\mydb.mdb";userid='me';pass='sa'"

    SQL = "Select * from mytable"

    Set RS = New ADODB.Recordset
    rs.open sql,conn


    And thats sort of how you would do it. Off the top of my head so this isnt quite correct, but it is enough to give you an idea.

    After that it is the same

    rs!fieldname = "something"
    rs.addnew
    rs.udate
    etc.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    Sorry I should have added my naming conventions in the file here it is....

    Code:
    '~~~~~Variable Naming Conventions~~~~~
    '~Global Variables = VariableName; i.e. Public PlayerName as String
    '~Global Constants = CONSTANT_NAME; i.e. Public Const PLAYER_NAME as String = "Teddy"
    '~Module Level Variables = LCase(Left(VariableType, 3)) + VariableName; i.e. Private strPlayerName as String
    '~Module Level Constants = CONSTANTNAME; i.e. Private Const PLAYERNAME as String = "Teddy"
    '~Function Level Variables = LCase(Left(VariableType, 1)) + VariableName; i.e. Dim sPlayerName as String
    '~Function Parameters = "p" + VariableName; i.e. Private Function SomeFunc(pPlayerName as String)
    Thanks for the feedback guys keep it coming!
    {Insert random techno-babble here}

    {Insert quote from some long gone mofo here}

  8. #8
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913

    re:

    One major tip especially important for IT jobs. If they ask you a question on how to do something, think about for a few seconds before you answer, and if you just flat out dont know, DO NOT try to bullshit your way through it with some bs answer. They will probably be able to catch it and it will just make you look the fool to them. Just honestly say you have no experince with that. But let them know that you do have the ability to learn it. Remember that the computer industry is always changing and its look better if they think you can learn new stuff to keep up rather than having a bunch of old outdated knowledge.

    And if you dont get it, just keep learning new stuff and looking else where.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    I've always kind of held that attitude in the 3 years I've been learning to program is that you can't know everything but with a couple of line's of code and some patience you can definitely learn it and to be honest I really don't expect to get the job because it is my first interview of this caliber but I do think it will definitely help me prepare for the next one.
    {Insert random techno-babble here}

    {Insert quote from some long gone mofo here}

  10. #10
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Good Job YoungBuck, after I went throught and looked at your code, I could tell you had a good amount of knowledge with SQL. The only thing I would suggest would be to sharpen up the GUI for the employer. A professional looking user interface is always a plus. Good Luck Bud

  11. #11
    Hyperactive Member Asaf_99's Avatar
    Join Date
    Jul 2000
    Location
    Israel
    Posts
    335
    Well... I can't give you much advice, 'co I, myself am only 13 years old, but I can tell you this:
    Make the code understandable, use spces how much you want, but don't make it annoy you.
    Another thing is to use the ' thingy whenever possible, it just makes the code understandable and better.
    Also try to optimize your code with the With statement, the For loop etc.
    A very important thing is if you have 2 or more events that do the same, store the code in a Function and Call it whenever needed. Then, when you have to change something, just go to the smae function and that would really make a difference in your app.

    And another thing, GOOD LUCK!
    Asaf Sagi

    ICQ: 61917199
    E-Mail: [email protected]

  12. #12
    Guest

    Non-technical info

    I have not looked at your code, but if you have been able to complete a program and have some basic standards (as Jop said, whether you abreviate strings with s or str is not that important....what is important is that you are consistent, don't name one string sSQL and the other strName).

    I see you are in N.C., so you are definitely in a very hot part of the US for IT jobs. When I was looking for a new job last year, I had a lot of inquiries from N.C., S.C and VA (I live in Ohio).

    It should not be too difficult to get hired if you demonstrate a basic technical knowledge, an ability and willingness to learn, and have basic people skills.

    I have a good friend who is in the recruiting field and she told me the biggest obstacle most engineers have to getting hired is that they act like typical engineers (hate to admit they don't know something so they try to BS their way through the interview, or they are just not friendly enough or excited about teamwork)

    If you know what kind of programs you will be working on, try to find some sample code on the web(vbaccelerator.com is excellent) to try to anticipate what you will be asked about. Most inteviews are rudimentary questions just to see if you have basic knowledge (can you declare public variables at the module level, why would you declare a variable as private in the declarations field rather than public, why would you use Do...Loop Until Condition rather than Do Until Condition...Loop, etc), but also be prepared for in-depth testing. I was flown into Richmond VA last year for a day and had 3 hours of testing (technical and psych) followed by the personal interview, it was quite exhausting.

    Also, using some of the interview practice scenarios available on Monster.com and Dice.com is a good idea.

    Just use a good mix of confidence, honesty, friendliness and controlled excitement. Use phrases like "I enjoy learning, I learn quickly, I thrive in a challenging atmosphere, and if you want the job, make sure you tell the interviewer that you want the job. I usually close my interviews when I do want the job by saying something like "I really want this job, do you see any obstacles that concern you about hiring me?" If they state any concerns, try to address them calmly and focus on positives rather than negatives...The most common one you may get is "You don't have any professional programming experience." You can answer that with something like "What I do have is technical knowledge, a willingness to learn and the ability to take intiative to achieve my goals."

    Okay, I'm rambling. I just know of too many people who blow interviews because they weren't prepared and I think that is a tragedy.

  13. #13

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    Excellent advice bubba and keeping myself calm and collected is something I definitely will have to put some effort into (I'm a bit of a nervous and excitable guy) so I will definitely take your advice. Unfortunately as far as location goes I am just outside the area where I need to be I live in Eastern NC around the Greenville area (home of the East Carolina Pirates) and there are as far as I can tell very few software development companies within a 40 mile radius, I just moved here from Raleigh which is near Research Triangle Park (I didn't have a choice, it was either move here or to a cardboard box) so if this doesn't pan out I am planning on getting some dependable transportation and will be making a 100 mile commute everyday to work as a computer programmer.
    {Insert random techno-babble here}

    {Insert quote from some long gone mofo here}

  14. #14
    Guest
    You seem to have a good sense of humor, it is always good if you can get the interviewer to laugh.

    I seem to recall a couple of recruiters from Greenville contacting me last year. Beatiful part of the country.

    We were hoping to move the the Raleigh area, but my wife makes too much money and I am a simple, humble, underpaid engineer.


    Good luck.

  15. #15
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Good job

    Like the code, but JAZZ up the inteface.

    Devote time to making it look SHARP, not just act SHARP. Know what I mean?
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  16. #16
    Hyperactive Member
    Join Date
    Oct 2000
    Posts
    400
    I wouldn't worry so much about the code - that's fine. A bit unusual naming convention, but that doesn't matter - only that you have one at all matters. A few too many superfluous comments, but that's not so bad.

    The database, however. Yikes! Redo that to use more normal data...how about a small inventory / shipping thing, or maybe a mailing list. An address book would be ideal. Get rid of that whole lb. versus ea. idea. Egad. It wouldn't be so bad except that your data concept lends itself naturally to some hardcore normalization, of which you do virtually none. (Category should be a lookup related to Item, you should be using a numeric unique identifier...ideally an AutoNumber, to link in the Items to the list instead of the name itself, and the same in Prices, and the AmtType should be a lookup, etcetera... Also, set some referential integrity.)

    I'd hire you on as-is for a position in a team of front-end developers, but after looking at the database you created, I wouldn't let you near the back-end. You're talented, though. Spend a week redoing it up to your level of ability, and I'd have a vastly different opinion, I'd wager.


  17. #17
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    'they won't hire you based on a program you bring to them but they will hire you on the fact that you are a likeable soul and that you do hold the fundamental knowledge of the field you are trying to become active in.
    Keep smiling and be courteous and mannerly and above all show a definate interest in becoming an employee of the company more so than just getting a job in programming.

    PS>
    your pgm is well documented, and it works. I would like a better screen but then again, I am an artist and space and color are a big item in my vocab. As for str verses s...bla bla...it's personal preference.

    Wishing you the best of luck in your endevours.

    Wayne
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  18. #18
    Hyperactive Member
    Join Date
    Oct 2000
    Posts
    400
    Here is the official Microsoft party line when it comes to the naming convention question:

    http://msdn.microsoft.com/library/de...nsoverview.htm

    I try to stick to it as closely as possible, mostly because I hate it when other programmers make fun of me for not.

  19. #19

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    jmcswain,

    Would you explain what you mean by more normal data, as far as the functionality of the program is concerned I really don't see a way around the current make-up of the database and this program is something that I actually use to make my shopping list's so me and my girlfriend know what we spend before we go shopping which is the reason I chose this app as my example because I know that it works and that it does what it is meant to do. Any suggestions are welcome.

    Also as far as naming conventions are concerned do the majority of software development companies use the microsoft standard naming convention or do you implement your own.

    Finally what suggestions do you have for the GUI (I am far from an artist).

    Thanks again people!
    {Insert random techno-babble here}

    {Insert quote from some long gone mofo here}

  20. #20
    Guest
    Just a couple of comments for you:

    The interface needs to be tightened up - there is nothing intriniscally wrong with it, but M$ spend big money on usability consultants, so it's not a bad idea to rip off the MS design approach - their UI's are very well thought out. The flow isn't too bad, although the buttons should probably be moved (either to the far left or bottom of the screen.)

    Learn a bit about ADO - you don't have to be a guru, as long as you can demonstrate that you realise that there are alternative methods to DAO.

    The varible naming is a personal preference, and the company will probably have it own internal conventions (well, you would hope so, any way).

    What you may need to do is to justify why you chose your particular style of coding (in this case procedural) over using a class/OO approach. Neither is necessarily any better than the other, but people will question you on the design approach, and the reasoning behind it.

    Good use of parameters - it's quite nicely broken up, although the modDBStuff subs would require renamiong if the project was to expand (they names are too generic)

    Oh, and there's no error handling. Might be worth doing that, particulalrly testing for vali database connections, and catching recordset update problems (locking etc)

    Otherwise, good code.

    - gaffa

  21. #21
    Guest

    Good...but failed to trap runtime error

    Hi buddy,

    done well written the code to standards, but you have not trapped runtime errors.

    For eg if I enter a new item in the list that has apostrophe the code is taking it and adding to the list but when i want to select that item from the list it is generating runtime error 3075 you have to trap this error and write code in it.

    Also another thing you have used listview I dont think it is clever to use listview when u have MSFlexGrid control which takes less amount of memory and u can also bind it to the database. You can also make the Remove Button disabled unless and until the user selects the item from the listview then u enable the Remove button.

    Thats it few minor changes.. Regarding ADO there is absolutely no props for U. if u have SQL knowledge u can cope both ADO and DAO. In realistic sense ADO is simpler than DAO.

    U have written good code. U will definately get a good job.
    Best of luck..




  22. #22
    Addicted Member LAURENS's Avatar
    Join Date
    Jan 2000
    Location
    Utrecht, the Netherlands
    Posts
    138

    That's not true

    As for str verses s...bla bla...it's personal preference.
    That's not true. str is doubtlessly a string.
    What is s ? Is that a string or a single?

    s is ambiquous, naming conventions are there to avoid that.


    Regards,
    Laurens

    Using VB5 Enterprise edition SP3
    VB6 Enterprise edition SP5

  23. #23
    Fanatic Member VBKNIGHT's Avatar
    Join Date
    Oct 2000
    Location
    Port25
    Posts
    619

    Wink good but not enough

    you must not use a lot of space..
    Design better interface
    Trap all possible errors
    KIS keep it simple...youre hired congratulations!


    If a post has helped you then Please Rate it!

  24. #24
    Hyperactive Member
    Join Date
    Oct 2000
    Posts
    400
    By "normal" I mean two things. First and foremost, I mean "normalized". Take a look at this file...it's your database but normalized. Go to the Tools menu and pick Relationships, then drag the tables around to make it look like the bitmap I included in the archive. (I have Access 2000, which won't retain Relationship diagrams when converting to 97.) The only thing that isn't normalized is the pricing based on amount type. Which brings me to my second meaning of "normal".

    The price based on quantity type is not normally found in your average business application. While it certainly could be, and would provide an interesting exercise in database design and normalization, it is more difficult to do properly than is worth the effort for a sample application.

    The database I've included is normalized except for the quantity-based pricing issue. If you understand how and why I set up the tables this way, and can connect your apps into the new structures, that would be a big step forward for both your database abilities and your sample app.
    Attached Files Attached Files

  25. #25
    Guest

    Naming conventions

    Actually LAURENS it is a personal preference (I don't necessarily mean each individual user's preference, but the preference of the company or team that set the standards).

    M$ does state using str, int, sng, etc. etc. but some companies and teams use differenct standards. My last company used s for string, i for int, n for single (can't remember them all) but they were a documented standard that all who worked in the company followed.

    These were standards that were put in place eons ago when mainframes were the only computers in the company and DASD was expensive hence the shortened abbreviations to save as much space as possible.

    So to maintain consistency, they just kept the old standards.

    I would personally be hesitant about working for a person who would mention the prefixes of variables during the interview (unless he just mentions that they have standards in place and asks YoungBuck if he would have a problem following a different set of standards).

    As I stated, the most important thing is to remain consistent.

  26. #26
    Hyperactive Member
    Join Date
    Oct 2000
    Posts
    400
    lol, I can just imagine that interview:

    (Stuffy humorless interviewer):
    QUICK! What is the prefix for a String variable?

    (Our intrepid YoungBuck):
    str...no, wait...s.

    S? S?!! Good God man, how could we possibly know if it's a String, or a Single, or was declared as Static? I cannot believe your ignorance! I have friends in this town, my young, foolish friend. You will be blackballed within the hour. Now get out of my sight!

    (As the downtrodden YoungBuck shuffles out, the interviewer can be heard muttering under his breath):
    "S? That's the most ridiculous thing I ever heard. These kids today..."

  27. #27
    Guest

    Talking LOL

    Who says engineers aren't funny?

  28. #28
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    ...for all you sinners who follow the crowd

    golly gee...
    strCompare...hmnnn was that a string variable or a string function...hmnnn...damn, that's outright silly, guess I'll just use sCompare in this situtation...then again, someone might laugh at me for using sCompare so I better change my variable name and call it strComparative...and on and on....

    get a life....if your variables are declared as they should be and your code is well documented you can use anything your little heart desires.

    Dim myString as String ' used to reference Cust Name

    myString = "Willie Jones"


    Documentation!

    Last edited by HeSaidJoe; Jan 30th, 2001 at 12:20 PM.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  29. #29

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    Well I went to the interview this morning and everything seem to go pretty well, not to many technical question's and the interviewer didn't even look at my sample app while I was there, but I got the 'will call you by the end of the week' statement which (in every other interview I've had for any job) means keep looking buster, but it was a good first experience anyway.

    As far as the variable naming thing goes I do use the str, int, etc. for my private module level variables, I just use the single letter prefix for my function level variables to make it easier for me to spot the scope of a particular variable on the fly.

    Now for the data normalization I see what you have done jmc and I would imagine that all the ___ID fields you have added are all using AutoIndex to make data retrieval faster, but I don't understand how, for one thing the database has now increased in size and how would I implement this into my project it seems to me as though I would need to run through some extra querys to retrieve the correct information.
    {Insert random techno-babble here}

    {Insert quote from some long gone mofo here}

  30. #30
    Hyperactive Member
    Join Date
    Oct 2000
    Posts
    400
    Yep, it requires more involved lookups. It's bigger now because there is an extra table, and there are now relationships. If you added thousands of records to each table, your original version would be bigger due to having a bunch of big strings (69 bytes each, if I recall...hehheh) repeated in the various tables, whereas in the normalized version they are only 4 byte long integers.

    Regarding the naming thing, if you want to tow the MS party line, scope is noted with an additional 1 character prefix applied before the type prefix. The table is:

    Code:
    g  Global
    m  Module
       Local (no scope prefix)
    p  Passed Parameter
    s  Static
    Granted, static is a lifespan, not a scope, but it seems silly to give it its own table, so I include it in scope.

    Therefore, glngUserID would be a global long holding the user id, pblnEnabled would be a boolean flag passed to a parameter, and mstrMessage would be a module (form) level string variable.

    Again, that's the MS party line. I use it, but I didn't make it up. (Although I use "var" instead of "vnt" for Variants, cause I'm such a stinkin rebel.)


    Glad your interview went well. The "we'll call you by the end of the week" isn't necessarily a kiss of death comment. I always found the "Where do you see yourself in 5 years?" question to be the kiss of death question.

  31. #31
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    COMPLETELY AGREE WITH HESAIDJOE

    I teach Intro to VB....

    I have NEVER made my students use the prefix to a Variable.
    Only to Controls. I Do however suggest giving the Variable a good Name.
    SO WHen you see it you know what it is. But if not..then to AT LEAST Document what its for.

    So Give me a Break

    Dim FirstName As String

    is just fine and should not have to be

    Dim strFirstName as String


    ---Geeez!!!

    -Geoff

    YoungBuck....My fingers Ar Crossed!

    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  32. #32
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    COMPLETELY AGREE WITH HESAIDJOE

    I teach Intro to VB....

    I have NEVER made my students use the prefix to a Variable.
    Only to Controls. I Do however suggest giving the Variable a good Name.
    SO WHen you see it you know what it is. But if not..then to AT LEAST Document what its for.

    So Give me a Break

    Dim FirstName As String

    is just fine and should not have to be

    Dim strFirstName as String

    if you dont want it to be!

    ---Geeez!!!

    -Geoff

    YoungBuck....My fingers Ar Crossed!

    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  33. #33
    Guest
    I had an interview for a VB job this morning. With any luck, I'll make it through to the 2nd-round interview stage!

    The 2 guys let me demonstrate my software samples to them, using a PC with a projector attached! I've never seen my projects blasted onto a wall 8 feet across each form! Sadly, the computer they gave me didnt have VB installed properly and my database app refused to work properly, but my translucent form went down well!

    Toes crossed

  34. #34
    Guest

    Send a note

    Always send a thank you note to the interviewer as well.

    E-mail is fine (that's what I did for my current job).

    Re-iterate your strengths, but keep it fairly short, and explicitly state that you really want the job.

  35. #35

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    This in reply to jestes you definitely wanna error trap thread. Well I understand error trapping and I used it in the only place I felt my app needed it (although thanks to n_indureddy I see that I missed a couple of things). My question is do you mean I should use error trapping in every procedure, becuase that just doesn't seem necessary to me, I've always thought of error trapping as a way to use the error in your favor in your program.
    {Insert random techno-babble here}

    {Insert quote from some long gone mofo here}

  36. #36
    Guest
    It is generally a standard to add error handling in every procedure.....most error handling is very basic:

    Code:
    Public Sub DoStuff()
    on error goto errhandler
    
    
    'code...........
    
    Exit Sub
    errorhandler:
    close whatever objects
    Set whateverobjects = nothing
    Call Error_File("Mmain", "DoStuff Sub", Err.Description)
    
    End Sub
    
    
    Public Sub Error_File(sModule As String, sRoutine As String, sError As String)
        Open "AllErrors.txt" For Output As #99
        Print #99, "An error occurred in YoungBucks's program while in the " & vbCrLf _
                    & sRoutine & " " & sModule & " module."
        Print #99, "The error was: " & sError
        Print #99, "The error occurred at " & Format(Time, "h:mm ampm") & " on "; Format(Date, "mmmm, d, yyyy")
        Close #99
        End
    End Sub
    You don't have to have a separate sub to record errors, but it makes it easier.

    In addition to just writing to a text file, you can record all the errors in your database, or send an e-mail message.

    When it is something only you will use, you can determine errors fairly easily, but if it is a distributed app, then you want to add the error handling so the users will be able to give you some useful information instead of "this dang thing don't work"

  37. #37

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    I have actually created a Class to handle all my error's before and I did put error handling in every procedure but after (I thought) I learned a little bit more I thought it was only necessary if an error was expected to happen, oh well good to know.
    {Insert random techno-babble here}

    {Insert quote from some long gone mofo here}

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width