Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old September 8th, 2004, 08:31 AM
kiran_karnati kiran_karnati is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Braunschweig , Germany
Posts: 39 kiran_karnati User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 44 m 5 sec
Reputation Power: 4
Send a message via Yahoo to kiran_karnati
Unhappy using a mdb file in a multiuser environment

Halloo everbody,
This is Kiran Karnati an Indian student from Germany.First time registered to a forum and posting a problem.
For my company I have developed an MS Access application, now my boss asked me to do this application in a multi user environemnt.
They want a central Access databse file in a shared folder and a database in every user system. I have splitted my Access database and put the backend in tha shared folder but it is working from only one system at one time. if the user who opend the front end of his system first , must close before the other user can open the application.
my forms are bound forms , may be this is the reason that they are not working, but I have tried to connect to the databse through ADO connection object but it is working from 1 system not any other systems.
can any one please reply me in connecting to a remote databse that is in a shared folder and give some idea how to show data onto form when it is unbound.
I have tried a method which is working from only one system, I don't know why?
that is :

Public Function uf_DisplayRecord(frm As Form, intRecord As Integer) As Integer

'Displays the record determined by intRecord

'returns the number of records in the recordset



Dim strConnection As String

Dim cnn As New ADODB.Connection

Dim rst As New ADODB.Recordset

Dim fld As ADODB.Field

Dim ctl As Control

Dim vartemp As Variant

Dim strCnn, strCtlname As String

Dim strQryUser As String

Dim ctlCount, ctlloop As Integer



Set cnn = CreateObject("ADODB.Connection")

strCnn = "Driver={Microsoft Access Driver (*.mdb)};" & _

"Dbq=\\D-server\persönlicher ordner\CABANNA_be.mdb;"



cnn.Open strCnn

strQryUser = "SELECT * FROM User"

Set rst = cnn.Execute(strQryUser)

rst.Move intRecord - 1
ctlCount = frm.Controls.Count
strCtlname = frm.Controls(1).Name
' Set frm.lbl.Caption = strCtlname
'Iterate through controls on form that match fields in recordset
For ctlloop = 0 To ctlCount
'if error the field is not on the form
On Error Resume Next
' Err = 0

strCtlname = frm.Controls(ctlloop).Name
vartemp = rst.Fields(strCtlname).Name
' If Err = 0 Then
' On Error GoTo ErrorHandler
'if control enables then set deafault value from tag and set focus if tab index 0
If frm.Controls(ctlloop).Enabled Then
frm.Controls(ctlloop).Value = rst.Fields(strCtlname).Value
If frm.Controls(ctlloop).TabIndex = 0 Then frm.Controls(ctlloop).SetFocus
End If
' End If

Next

rst.Close
cnn.Close
uf_DisplayRecord = rst.RecordCount

End Function



I have another prolem too I have a form which has a subform and that subform must be in a datasheet view how to implement this form with a subform using VBA ( the method I have used or anything else ) without using bound forms.
I thank every one who is spending time to read this post.
I feel lucky if any one spend time to help me.
Thanks a lot in advance.
Kiran Karnati.

Reply With Quote
  #2  
Old September 8th, 2004, 08:34 AM
kiran_karnati kiran_karnati is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Braunschweig , Germany
Posts: 39 kiran_karnati User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 44 m 5 sec
Reputation Power: 4
Send a message via Yahoo to kiran_karnati
kkk

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > using a mdb file in a multiuser environment


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway