Genral questions on a Issues Tracker application

lasercobra
09-10-2003, 09:36 AM
First off, you guys rock!

I'm creating a VERY simple issues tracker application for my work. It will be referencing an Access DB to store the information. The fields are:
Date issue reported
Date issue resolved
Issue
Issue resolution
comments
Etc

I would like to make it a multiple user application so multiple people can access it at once. A single DB file that all users update. I was looking into an ODBC but I can't get past an error of 'DataSource name too long'.
Is there anything within the access DB file that must be set in order to have it work the way I want it to?

What is the code to keep the next or previous button from going too far and displaying an error?

Also, my save record it wrong, I need help.

Here is my code. Please remember that I'm a newbie...

Dim varCurrentRecord As Variant
Dim blnAddingRecord As Boolean

Private Sub Command1_Click()
dta.Recordset.MoveNext

End Sub

Private Sub Command2_Click()
dta.Recordset.MovePrevious

End Sub

Private Sub Command3_Click()
dta.Recordset.MoveFirst
End Sub

Private Sub Command4_Click()
dta.Recordset.MoveLast
End Sub


Private Sub mnuAbout_Click()
frmSplash.Show
End Sub

Private Sub mnuAdd_Click()
varCurrentRecord = dta.Recordset.Bookmark
dta.Recordset.AddNew
blnAddingRecord = True
End Sub

Private Sub mnuDelete_Click()
dta.Recordset.Delete
End Sub



Private Sub mnuExit_Click()
End
End Sub

Private Sub mnuSave_Click()
dta.UpdateRecord
If blnAddingRecord Then
Command4_Click
blnAddingRecord = False
End If
End Sub

rahamad
09-10-2003, 09:41 AM
To restrict where you are in the file, check for the EOF or BOF flags when you do the MoveNext or MovePrevious methods.

For example:

If Not MyRecordset.EOF then
MyRecordset.MoveNext
Endif

lasercobra
09-10-2003, 09:52 AM
If Not MyRecordset.EOF then
MyRecordset.MoveNext
Endif

I gotcha.

It all just seems so simple when you guys show me but MAN there is a lot of things to remember on here.

Any ideas on the DB side of my question?

When I create the exe, it imports the DB into the app so everyone would have different DB's. I want everyone to update the same DB and possibly at the same time. Granted that they are not updating the same record...

lasercobra
09-10-2003, 09:56 AM
My update record string it incorrect also. Although it was working until I started messing with all sorts of stuff.

Corrections?

rahamad
09-10-2003, 10:01 AM
It depends on what kind of DB it is on how to set it up. If you have relatively few users (100 or less) I recommend MS Access. You can store the file on a shared network drive, and then in your code, just indicate the path to the DB, and all users will access the same DB.

My personal recommendation is to use ADO for your DB access, so you can use the Connection and Recordset Objects. Then just set the connection path to the path of the DB, and set it so that multiple users can access the file.

For example:

Dim myConnection as New ADODB.Connection
Dim myRecordset as New ADODB.Recordset

myConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\mypath\mydatabase.mdb"
myConnection.Open

myRecordSet.Open "Select * from myTable", myConnection, adOpenDynamic, adLockOptimistic

rahamad
09-10-2003, 10:03 AM
Your Update should be something like this:

MyRecordset.Update

This will update the data in the recordset to the main database

lasercobra
09-10-2003, 10:25 AM
Your Update should be something like this:

MyRecordset.Update

This will update the data in the recordset to the main database


Luckily there will be no more than 6 people accessing it at a time.
I have the access DB set-up and your previous help works like a champ but the update is giving me an error.

I tried just dtaRecordset.Update and I get Run time error 404, Object required.

dta is what I named my data bar.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum