473,587 Members | 2,489 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB6 Adodc not working on other PC

104 New Member
Hi all, got a problem that is driving me insane, have tried everything and wondering what I am missing. Have a adodc connection to a mdb. On the development PC the database reads perfectly to the text boxes. Soon as I compile the project and run on another machine it does not populate the text boxes and previous / next command buttons don't work either. Yet if I open the exe from the "design pc" across the network it reads perfectly?????? No error message while in design mode or in compiled mode on other pc. The text boxes have been set in their properties. Please could anyone advise as to what they think the problem might be?

Herewith my code to call the mdb on form open:
Expand|Select|Wrap|Line Numbers
  1. SalAdodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\Data\Sal.mdb;Mode=ReadWrite|Share Deny None;Persist Security Info=False;Mode=ReadWrite|Share Deny None;Persist Security Info=False"
  2.     SalAdodc1.RecordSource = "SELECT * FROM Table1"
  3.     SalAdodc1.Refresh
  4.     If Not SalAdodc1.Recordset.EOF Then SalAdodc1.Recordset.MoveFirst
  5.  
  6.  
  7. SalAdodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\Data\Sal.mdb;Mode=ReadWrite|Share Deny None;Persist Security Info=False;Mode=ReadWrite|Share Deny None;Persist Security Info=False"
  8.     SalAdodc2.RecordSource = "SELECT * FROM Staff"
  9.     SalAdodc2.Refresh
  10.     If Not SalAdodc2.Recordset.EOF Then SalAdodc2.Recordset.MoveFirst

Have added this code in to see if it will not help with no luck
Expand|Select|Wrap|Line Numbers
  1.     Set Text21.DataSource = SalAdodc2
  2.     Set Text22.DataSource = SalAdodc2
  3.     Set Text23.DataSource = SalAdodc2
  4.  
Thanks
Werner
Apr 15 '09 #1
12 5098
Wernerh
104 New Member
Does no one know what the problem might be?
Apr 15 '09 #2
MikeTheBike
639 Recognized Expert Contributor
Hi

Just one thought, does the connection string 'App.Path' apply to both PCs??


MTB
Apr 16 '09 #3
Wernerh
104 New Member
Hi, the app.path is directed at the host pc (but also works across network). When software installed on a pc all mdb etc installed with it. So in effect a clone. I have other mdb links within same project on other forms and functions that work no hassle to host and across network. Just this one that will not work when I entire program to other pc. On development pc it works fine????? got me baffled beyond belief. Any Ideas would be apprciated.
Apr 16 '09 #4
Wernerh
104 New Member
Just as a matter of interest, I have copied the database connection code within the same project from another point to this form. Just changed the name to the new MDB and set text boxes up for new mdb. So no reason why it should not work??
Apr 16 '09 #5
CyberSoftHari
487 Recognized Expert Contributor
Is your project a multiuser system?
If Yes, Then you should change
App.Path
to
"\\SystemName\D atabasePath\Dat abase.mdb"
Apr 17 '09 #6
Wernerh
104 New Member
No, just can run through network to access app. It is a clone, basically each client has a copy with their data in it. On development pc database works perfectly. install program on any other pc and won't "read" database, yet paths are correct and installed mdb on pc. Even went and deleted mdb on other pc and ran software which gave error in locating database. (which was great, means it sees mdb) yet won't show in Textboxes, when mdb was put back on pc.
Apr 17 '09 #7
CyberSoftHari
487 Recognized Expert Contributor
I Think your system(Project) is multiuser interface and you are making it more complicated by cloning Database. My suggestion is never do cloning.
Apr 17 '09 #8
Wernerh
104 New Member
Ok, could you just eloborate on how you define cloning. I used one of the other databases that work, deleted the tables and put new tables in for new form. Would you say that is cloning? Ok, will try redo the database from scratch and and see if that works. Thanks for the idea, will let you know if it works (holding big thumbs!!!)
Apr 17 '09 #9
CyberSoftHari
487 Recognized Expert Contributor
Is this your project structure?
Attached Images
File Type: jpg untitled.jpg (9.7 KB, 430 views)
Apr 17 '09 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1137
by: Meher Malakapalli | last post by:
Hi I have an application built in VB6. It uses an adodc control bound to several other controls. After installing the .NET framework, the application's data-bound controls no longer display the data from the recordset contained by the adodc control. Has anyone run into this problem? Thanks M
4
5978
by: Raoul Watson | last post by:
I have a form with an AdoDc control associated to a datagrid. The AdoDC uses a "ConnectionString" such as "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=..." this is where the problem begins. The data source will not be known until the user selects the database. What is really weird is that if the source is not...
1
2316
by: blobi | last post by:
i tried to use adodc with unknown recordsource but it couldn't work when i was using datagrid with adodc as datasource. "ADO can not set for the command text". why i failed for using adodc with unknown recordsource while i would like to plan dynamic sql command. thanx
9
3312
by: Neelesh2007 | last post by:
Hi All, I have developed project in VB6.0 with access as backend.I have used ADODC control in VB to retrieve data from access. I have created the Setup file by Package & Deployment. Now when i install the software on other PC whole program works fine but ADODC can not establish connection with database. Then if I install VB6.0 then only ADODC...
2
1312
by: techie2 | last post by:
Can you help me to handle the error with ADODC? When I run any form which has ADODC on it I get an 'Operation was cancelled' or 'Could not find installable isam' errors. How to eliminate these errors? Added to this When I open my components list, I find it blank even after I registered them manually I don’t find them after I reopen it. Help...
4
1483
by: alem | last post by:
Hallo friends! PlS help me I got confused. Can I use ADODC and ADODB together if I can; I already applied ADODC in my database file. How to use mathimatical functions and other code shall I use array for the text box I already use ADODC for some commands I need to use ADODB..
6
4090
by: hussainiyad | last post by:
Hi all, I,m new to vb.6.0 and i don,t know how to connect to sql server through v.b 6.0 with the help of adodc control, and anyone plz tell me how connect and insert ,update,delete and other functions, coz i tried in m.s access not in sqlserver, This is the coding which i used in ms.access 'for insert rs.Fields(0) = Text1.Text...
6
2392
by: hussainiyad | last post by:
Hi all, Can anyone tell me how to get a record for particular field, in my sql i,v Pinvoice table following fields InvNo int ItemNo int Descrption varchar(20) Price float Qty Gross float 1001 090 Fan 30 5 150 1001 080 Table ...
2
1604
by: Wernerh | last post by:
Hi, please can anyone tell me if there is a way to navigate two adodc controls. I have a from with adodc1 and adodc2 - each linked to their own mdb table working perfectly. Is there any way by code that if you use the adodc1 control to navigate to the next record it will mirror this action in adodc2. Would appreciate any insight, not even sure...
0
7923
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8216
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8221
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5719
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3845
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1192
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.