473,406 Members | 2,956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Create Datasource programatically

myusernotyours
188 100+
Hi!
I want to access a database (ms access) without having to create a datasource from the control panel. Can i create a datasource dynamically so that my users only need to specify the path?
help will be really good!
Mar 29 '08 #1
6 3043
pronerd
392 Expert 256MB
Have you looked at using JDBC so you can just specify the URL of the database, and do not have to specify it every time.
Apr 1 '08 #2
myusernotyours
188 100+
Have you looked at using JDBC so you can just specify the URL of the database, and do not have to specify it every time.
Am using jdbc odbc bridge I specify the url as follows. "jdbc:odbc:datasourceName" where datasourceName is the name of the datasource. I want to be able to use the path to the access database instead of the datasource name.
Apr 3 '08 #3
JosAH
11,448 Expert 8TB
Am using jdbc odbc bridge I specify the url as follows. "jdbc:odbc:datasourceName" where datasourceName is the name of the datasource. I want to be able to use the path to the access database instead of the datasource name.
Normally it doesn't work that way with DataSources; a DataSource binds itself
to a name using the JNDI mechanism just to circumvent that a client has to
knot absolute paths etc. The client just asks the JNDI mechanism for a name
and it'll return the bound DataSource.

kind regards,

Jos
Apr 3 '08 #4
myusernotyours
188 100+
Normally it doesn't work that way with DataSources; a DataSource binds itself
to a name using the JNDI mechanism just to circumvent that a client has to
knot absolute paths etc. The client just asks the JNDI mechanism for a name
and it'll return the bound DataSource.

kind regards,

Jos

I don't understand. It's a desktop application and I don't want users to create a datasource from the control panel. Can you post some code.
Apr 3 '08 #5
r035198x
13,262 8TB
I don't understand. It's a desktop application and I don't want users to create a datasource from the control panel. Can you post some code.
Look up JNDI like has been suggested and read on how register and access datasources using JNDI. Asking for code is almost always the wrong thing to do here.
Apr 3 '08 #6
myusernotyours
188 100+
Look up JNDI like has been suggested and read on how register and access datasources using JNDI. Asking for code is almost always the wrong thing to do here.

Thanks. I will look that up. The reason I asked for code is coz I thot it was a simple matter with a straight forward example. I will look that up.

regards.
Apr 3 '08 #7

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

Similar topics

7
by: pintihar | last post by:
Hi, As a follow on from an earlier post I have another question about xslt. Is it possible to create the stylsheet programatically? Is this sensible? In the first phase I needed to map element...
1
by: Mike Grishaber | last post by:
Hello All, Does anyone know how to programatically create an ODBC datasource in C#? I want to access some comma separated files using ODBC, and I don't want to go into the configuration...
0
by: Alex | last post by:
Howcan I assign the DataKeys property of the datagrid programatically from a datasource not using the property builder? E.g. Data_grid1.DataKeys = ???? a column from the dataset?
2
by: louise raisbeck | last post by:
Hi there, I cannot write a datagrid on the aspx because i do not know the names of the column headings until i run a query. So i have to do it programatically from the datasource. I have managed...
1
by: Dale Williams | last post by:
Everyone: Using C#, I'm trying to create a datagrid on a winform programatically. I placed the datagrid and the form and named it CHGrid. Here's the code I'm using: // Get and bind the data....
2
by: myzm | last post by:
Hi, I have a FormView looks like this <asp:FormView> <ItemTemplate> <asp:Table> <asp:TableRow> <asp:TableCell> <asp:TextBox ID="textBox1"> </asp:TableCell>
0
by: DrSnap | last post by:
Hi, Admitted I am a newbie to Oracle (databases in general) but now Ive installed the Oracle DB v.10g and the ODAC development tools for Microsoft Visual Studio 2005. So, now i've found out,...
7
by: The Mad Ape | last post by:
Hi I have code to programatically create a label. It works but when I try to call a sub to create a tooltip it does not work. I do not get an error so have no idea what it wrong. Please review...
11
by: =?Utf-8?B?UGV0ZXIgSw==?= | last post by:
I am working with Visual Studio or alternately with Expression Web. I need to create about 50 aspx pages with about 1200 thumbnali images, typically arranged in three to four groups per page,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...
0
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...

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.