We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,661 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

I Need Help With My VB6 Project

Hi All,
I am doing a project on a Video Library Management System for my final year Computer Science project and I've run into acouple of errors. Could anyone out there help me out...???? Please, I'm desperate...!
Thanks.

6
Contributors
11
Replies
2 Months
Discussion Span
2 Years Ago
Last Updated
12
Views
Question
Answered
viperdamus
Newbie Poster
5 posts since Apr 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Yes we may be able to help you but without knowing what the code is, the err.number and err.description,... well presently we are clueless as how to help you....

Good Luck

vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 298
Skill Endorsements: 3

I want to upload the whole thing... Gimme a sec...

viperdamus
Newbie Poster
5 posts since Apr 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Here's the file... But apparently this site doesn't allow WinRAR files so it's shared on Google Documents... --> https://docs.google.com/leaf?id=0B52wIfN_dSxoN2RiOTM1Y2UtZGRkNy00YzFkLWFmZWQtODY4ZmVhOWY3YTRk&hl=en

viperdamus
Newbie Poster
5 posts since Apr 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

First of all, you are using a datacontrol to handle all your data requirements. I personally would have used ADO etc, where you can specify

App.Path

.
Currently you have your database in your F: drive. Make sure that when you are running your app, the database is in the same drive on the host pc, otherwise you will get errors of not finding/connecting to the database.

Secondly, when adding new data, i.e. a new user, you have the following code -

!Address = Int(txtAddress.Text)

. This will raise an error if a user enter text and not an integer or numbers, as is what happened to me. Build error traps into your application... You will use something like -

If Not IsNumeric(txtAddress.Text) Then
        SendKeys "{BackSpace}"
End If
'Use this in the txtAddress_Change sub

Thirdly, when you view your clients from your datagrid and you select to add a new client, AFTER saving the record, refresh your datagrid so that the new client can be viewed -

datClients.Refresh
'You should refrain from using dat as a prelude to a datagrid name. Rather call it grdClients. datClients would normally refer to a datacontrol.

Fourthly, we do not use Gloabal anymore. Use Public instead. You are also refrencing a textbox in your module -

If (txtMovieID.Text = "") Or (txtMovie_Name.Text = "") Or (txtGenre.Text = "") Or (txtType.Text = "") Or (txtMovie_Year.Text = "") Or (txtCopies.Text = "") Or (txtRating.Text = "") Then
        flag = 1
    Else
        flag = 0
    End If

, but nowhere on which form it is placed. Again, personally, I would rather use the variables on a form level, and not in a module. Else try to add the following -

If (frmClientRecords.txtMovieID.Text = "") Or (frmClientRecords.txtMovie_Name.Text = "") Or (frmClientRecords.txtGenre.Text = "") Or (frmClientRecords.txtType.Text = "") Or (frmClientRecords.txtMovie_Year.Text = "") Or (frmClientRecords.txtCopies.Text = "") Or (frmClientRecords.txtRating.Text = "") Then
        flag = 1
    Else
        flag = 0
    End If

This is how far I got testing your app. First try and correct these problems before we continue. REMEMBER, add error trapping to your application. Do not wait for it to generate the error first and crash. Run your app constantly to test all the code you have added.

Good luck. If you find more errors, let us know where the error occurred, and we can help you so much quicker.:)

AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20

Thanks alot, lemme debug then ill get back to you... Though btw i'm using ADO, it's easier to access the database with it...

viperdamus
Newbie Poster
5 posts since Apr 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Cool man. Please close this thread if you are done with it. As far as ADODB etc is concerned, still the best, because you will always be able to connect to your database without having it in your path specified when coding. You will find this when you start installing on client machines or you start running servers etc.

I have attached a file that will help you a LOT, which will also show you how easy it really is.

Enjoy coding bud...

Attachments Ado1_with_all_possible_connections.zip (210.05KB)
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20

Cool man. Please close this thread if you are done with it. As far as ADODB etc is concerned, still the best, because you will always be able to connect to your database without having it in your path specified when coding. You will find this when you start installing on client machines or you start running servers etc.

I have attached a file that will help you a LOT, which will also show you how easy it really is.

Enjoy coding bud...

My apologies dude, this happens when you rush through other peoples code. I see that you have used ADO, sorry. I have however picked up errors on your datacontrols. Skip the attachment, you are doing well. I'll play around a bit more with yours and re-submit that again, cool?

AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20

Thanks for taking the time. In the mean time, lemme continue making the corrections you mentioned.

viperdamus
Newbie Poster
5 posts since Apr 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Hi All,
I am doing a project on a Video Library Management System for my final year Computer Science project and I've run into acouple of errors. Could anyone out there help me out...???? Please, I'm desperate...!
Thanks.

wow nice project .. video library please help me to my final project like that ..

lesna
Newbie Poster
2 posts since Jun 2010
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

i need help on system analysis &design with my project on hostels management system using vb

fanty
Newbie Poster
1 post since Jun 2010
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

Hi,

I'm glad you got it helpful. Please do not resurrect old threads. If you have any questions please ask. You are welcome to start your own threads.

Thread Closed.

__avd
Posting Genius (adatapost)
Moderator
8,737 posts since Oct 2008
Reputation Points: 2,141
Solved Threads: 1,262
Skill Endorsements: 51
Question Answered as of 2 Years Ago by AndreRet, __avd, vb5prgrmr and 2 others

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.0911 seconds using 2.68MB