ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 16th, 2002, 11:25 AM
slfrudd slfrudd is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Bradford , UK
Posts: 13 slfrudd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question ActiveX Control and Database Binding

Hi,

I'm trying to code an Active X Control / Document that will connect to a database which is stored on the web server.

I've succesfully coded the whole thing using a local DB

What I want to know is how can I connect it to an internet DB ?

I've got loads of ADOdc controls in my project, and I've got someone to create a DSN on the web server but I dont know how to connect to it.

I cant seem to find the right Data link type when you set up the connection string.

I've even tried coding a Custom Property into the Control which I then set to a connection string within the internet explorer container but it didnt work either..........

What is the Microsoft ODBC for internet publishing Data link and why cant I get anything out of it.

Can anyone help with this please ?

Thanks very much in advance

Scott.

Reply With Quote
  #2  
Old October 16th, 2002, 01:51 PM
aspnewbie aspnewbie is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: The Great White North
Posts: 361 aspnewbie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 50 sec
Reputation Power: 7
Send a message via MSN to aspnewbie
What's your db - Access 97, Access 2000, SQLServer 2000, SQL Server 7? If you let me know, I should be able to help you with writing the connection string.

Is the webserver IIS?

Last edited by aspnewbie : October 16th, 2002 at 07:10 PM.

Reply With Quote
  #3  
Old October 17th, 2002, 03:08 AM
slfrudd slfrudd is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Bradford , UK
Posts: 13 slfrudd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs up ActiveX Control and DataBase binding

Hi,
The DB is an Access 2000 database and the server is a IIS......

Hope you can help



Scott

Reply With Quote
  #4  
Old October 17th, 2002, 09:38 AM
aspnewbie aspnewbie is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: The Great White North
Posts: 361 aspnewbie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 50 sec
Reputation Power: 7
Send a message via MSN to aspnewbie
Hi Scott,

I hope I haven't spoken too soon, now that I reread your email. Is your activeX control within an ASP page? If so, here's the code you would include:

Just insert the path for your db in the appropriate spot

Dim dcnDB ' CONN object
set dcnDB = Server.CreateObject ("ADODB.Connection")
dcnDB.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;"_
& "Data Source=C:\pathtoyourdb.mdb"
dcnDB.Open

Reply With Quote
  #5  
Old October 17th, 2002, 10:03 AM
slfrudd slfrudd is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Bradford , UK
Posts: 13 slfrudd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ActiveX Control and Database Binding

If you look at the attachment you might get some idea of this control - its a database driven active X control that I want to display in a web page. There are loads of ADOdc controls on it which have connection strings to a database which contains tables which are then bound to fields in the control

The DB is on the web server......

I got the control to work by connecting it to a local DB but I want to make the DB reside on the web server because the users of the control will be accessing it on the intranet

I even tried to make a property of the control that would set all the Adodc connection string but it didnt work....
Code:
Public Property Get DataSrc() As Variant
DataSrc = Adodc1(10).ConnectionString
End Property

Public Property Let DataSrc(ByVal vNewValue As Variant)
Dim recstring As String
recstring = vNewValue
Label2(0).Caption = recstring
Adodc1(10).ConnectionString = recstring
Adodc1(10).Refresh
editADO(0).ConnectionString = recstring
editADO(0).Refresh
editADO(1).ConnectionString = recstring
editADO(0).Refresh
editADO(2).ConnectionString = recstring
editADO(0).Refresh
editADO(3).ConnectionString = recstring
editADO(0).Refresh
editADO(4).ConnectionString = recstring
editADO(0).Refresh
editADO(5).ConnectionString = recstring
editADO(0).Refresh
editADO(6).ConnectionString = recstring
editADO(0).Refresh
AdminADO.ConnectionString = recstring
AdminADO.Refresh
End Property


In this way I was hoping to be able to set the connection string of the ADOdc's after the contol was compiled and sitting in a web page......

I think all I need is the correct connection string for the ADOdc's

Scott.
Attached Images
File Type: jpg devart_image1.jpg (79.1 KB, 176 views)

Reply With Quote
  #6  
Old October 17th, 2002, 10:26 AM
aspnewbie aspnewbie is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: The Great White North
Posts: 361 aspnewbie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 50 sec
Reputation Power: 7
Send a message via MSN to aspnewbie
So sorry Scott, I have no idea. I notice there are a couple of postings about connecting to a remote database, but I don't think that's what you're exactly after either.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > ActiveX Control and Database Binding


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



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

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





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT