Click here to Skip to main content
15,919,434 members
Home / Discussions / Database
   

Database

 
QuestionDecimal field format problem Pin
Branislav Vidovic1-Jul-09 3:25
Branislav Vidovic1-Jul-09 3:25 
AnswerRe: Decimal field format problem Pin
Enver Maroshi1-Jul-09 6:58
Enver Maroshi1-Jul-09 6:58 
GeneralRe: Decimal field format problem Pin
Branislav Vidovic1-Jul-09 12:19
Branislav Vidovic1-Jul-09 12:19 
GeneralRe: Decimal field format problem Pin
Enver Maroshi1-Jul-09 23:18
Enver Maroshi1-Jul-09 23:18 
GeneralRe: Decimal field format problem Pin
Blue_Boy2-Jul-09 3:03
Blue_Boy2-Jul-09 3:03 
QuestionMDB opened indication Pin
udikantz1-Jul-09 0:05
udikantz1-Jul-09 0:05 
AnswerRe: MDB opened indication Pin
paas1-Jul-09 1:46
paas1-Jul-09 1:46 
AnswerRe: MDB opened indication Pin
Branislav Vidovic1-Jul-09 3:54
Branislav Vidovic1-Jul-09 3:54 
Well you can improvise. Every time you check if some text file exists in the same directory as your databse. If it does not exists you create it. If it does exists that means that someone already opened the connection and you can implement code that generates warning.
Just don't forget to delete this file when you close connection.
As for the access client, every time you open mdb file with access or any other database managing software (this includes your connection that you create from your application) another file will be created in the same folder as your database. It will have the same name but different extension (.ldb). So you can combine this feature also with the one i described to get more detailed informatiopn.
I will try to code one example here(let us say your database name is "base.mdb"):
connection.Open();
if(File.Exists("C:\\opened.txt") == true && File.Exists("base.ldb") == true)
  MessageBox.Show("Connection is opened by your application");
if(File.Exists("base.ldb") == true)
  MessageBox.Show("Connection is opened by Access client");
Else
  File.CreateText("C:\\opened.txt")


Of course dont forget to delete the text file after closing connection:
connection.Close();
if(File.Exists("C:\\opened.txt") == true)
  File.Delete("C:\\opened.txt")


Any way this is the general idea. In a text file you could write much additional information on who opened the databse, when, etc..

Cheers!
GeneralRe: MDB opened indication Pin
udikantz1-Jul-09 4:45
udikantz1-Jul-09 4:45 
GeneralRe: MDB opened indication Pin
David Skelly1-Jul-09 6:17
David Skelly1-Jul-09 6:17 
GeneralRe: MDB opened indication Pin
riced2-Jul-09 7:09
riced2-Jul-09 7:09 
QuestionSplitting Rows in SQL Server 2005 Pin
rajanandal30-Jun-09 19:04
rajanandal30-Jun-09 19:04 
AnswerRe: Splitting Rows in SQL Server 2005 [modified] Pin
Niladri_Biswas30-Jun-09 20:02
Niladri_Biswas30-Jun-09 20:02 
GeneralRe: Splitting Rows in SQL Server 2005 Pin
rajanandal30-Jun-09 20:32
rajanandal30-Jun-09 20:32 
GeneralRe: Splitting Rows in SQL Server 2005 [modified] Pin
Niladri_Biswas30-Jun-09 20:45
Niladri_Biswas30-Jun-09 20:45 
AnswerRe: Splitting Rows in SQL Server 2005 [modified] Pin
rajanandal30-Jun-09 20:53
rajanandal30-Jun-09 20:53 
GeneralGreen Screen Studio Pin
atlas2130-Jun-09 17:07
atlas2130-Jun-09 17:07 
GeneralRe: Green Screen Studio Pin
Mycroft Holmes30-Jun-09 17:49
professionalMycroft Holmes30-Jun-09 17:49 
GeneralRe: Green Screen Studio Pin
Jerry Hammond1-Jul-09 3:44
Jerry Hammond1-Jul-09 3:44 
QuestionRandom Access to DB Pin
LucBite30-Jun-09 4:26
LucBite30-Jun-09 4:26 
AnswerRe: Random Access to DB Pin
David Mujica30-Jun-09 4:48
David Mujica30-Jun-09 4:48 
AnswerRe: Random Access to DB [modified] Pin
Niladri_Biswas30-Jun-09 4:53
Niladri_Biswas30-Jun-09 4:53 
QuestionSQL server 2003 Pin
jamith30-Jun-09 2:52
jamith30-Jun-09 2:52 
AnswerRe: SQL server 2003 Pin
Jerry Hammond30-Jun-09 13:25
Jerry Hammond30-Jun-09 13:25 
AnswerRe: SQL server 2003 Pin
Mycroft Holmes30-Jun-09 17:51
professionalMycroft Holmes30-Jun-09 17:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.