Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two computers updating sql dbase

Status
Not open for further replies.

Johalak08

Programmer
Aug 1, 2008
14
CA
Please help.

I have a VB application using sql dbase. The application is installed in two computers. I am having problems when the 2nd computer is updating the dbase and/or both computer accessing the dbase. Do i need to lock the sql dbase? Please help on how to do this.

Currently, I have this..
Form_Load()
Set adoCOnnection = New ADODB.Connection
Set adors = New ADODB.Recordset
connectstring = "Provider=SQLOLEDB.1......."
adoCOnnection.Open connectstring


cmdSave_Click()

adors.CursorType = adOpenDynamic
adors.CursorLocation = adUseClient
adors.LockType = adLockOptimistic
adors.open "SELECT * FROM.....", adoCOnnection
Dim query as String
query = "INSERT INTO .......... VALUES...."
adoConnection.Excute query
adors.Close

Any help is greatly appreciated. Thank you
 
I recently helped someone else create their first stored procedure. You can read up on it here: thread222-1575701

While not directly related, I have a series of blogs that I wrote with lots of useful information: My Blogs. I'll be starting a new series of blogs probably some time next week that explaining things you should NOT do with SQL Server. The series of blogs will be aimed towards beginners, so I think there will be a lot of useful information for you there.

There are a ton of reading material on the internet. There's also a ton of good books. If you truly want to become an expert, you'll have lots of reading to do. But you'll also need to practice your skills in order to truly understand. Also, I find that helping others in forums is the best way to improve. I was once watching one of those medical dramas on TV. Someone said (regarding a medical procedure), read about it, watch it, do it, teach it! How true.

Once you write the stored procedure, feel free to post it here and I'll take a look at it (if you want).

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
ok..The stored procedure looks scary for me. It might take some time but i'll be back with you.

Thanks. I really appreciate your help :)

 
>Strongm pointed out in another thread that Long's actually perform better, too

To be fair, what I really meant was that, contrary to popular opinion, there is no performance advantage in VB with Integers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top