Database & DSN connection
Hi!
I use access database in my program and for that i'm setteling a connection to dsn in control panel. if i want to use my program in a site on the net, how can i connect the program to the database, cause that connection is only for the current computer?
Tahnx!
First write a Java program that successfully connects to the Access database locally and does the sort of thing you want to do with it (run queries, presumably). Then read some tutorials or articles on distributed programming to figure out how you want to connect to the server from the client based on your needs. Could be RMI, CORBA, web services, a servlet...
Similar Messages
-
Creating DSn connecting database in the same drive)
Hi I am creating a DSn by Java prograame
I have a Java file DSN.java where a fynction is written
createDSN(String driverType, String dsnName, String filePath)
I have all my .java files in D: Drive
and when i am giving filePath as
String fP = "\\folder1\\NameOfMyAccessfile.mdb"
it is trying to create DSN( name as dsnName ) by mapping it to file in C Drive but normally it should try to create DSN connecting the database in the root directory.(in my case it is D drive)
My JDk is in C drive
Please help me how to create DSN when the database is in the root directory?
Thankssalam,
je voulais te demander si tu peux:
*comment tu fais pour creer un DSN en java directement.
*comment tu fais pour avoir la liste de tes DSN sur ta machine,
*comment tu fais pour te connecter via une DSN.
--- je te remercie d'avance de ta collaboration; -
Java DSN connection to database
This code compiles without error and executes as anticipated but does not make the database update...
public void updateFunctionality(String lastName, int goalsIntScored )
String sql = "Update UsersTable Set PlayerGoalsScored= " + goalsIntScored + " Where PlayerLastName= " + lastName + ";
try
dbAccessCon.getStatement().execute(sql);
System.out.println("Data Updated");
dbAccessCon.disconnect();
catch ( SQLException e )
System.out.println( "Error: " + dbAccessCon.getLastError() );
System.out.println("Record Updated");
}Can a pair or fresh eyes help me?It still won't make the update, it has to be the SQL statement doesn't it?
I've tried all the ' and " combinations possible and still no luck.
public void updateFunctionality(String lastName, int goalsIntScored ) throws SQLException
String sql = "Update PlayerTable Set PlayerGoalsScored= " + goalsIntScored + " Where PlayerLastName= ' " + lastName + " '";
try
dbAccessCon.getStatement().execute(sql);
System.out.println("Data Updated");
dbAccessCon.disconnect();
dbAccessCon.close();
catch ( SQLException e )
System.out.println( "Error: " + dbAccessCon.getLastError() );
System.out.println("Record Updated");
}Here is how I make my DSN connection:
public boolean connect( String user, String password, String dataBase)
// If we are connected, disconnect first!
if ( isConnected )
if ( !disconnect() )
return( false );
// Construct a JDBC connection URL
String dbUrl = "jdbc:odbc:" + dataBase;
// Was there a problem?
if ( dbUrl == null )
return( false );
// Try to make a connection...
try
// Make a properties object to pass to the JDBC driver...
Class myClass = sun.jdbc.odbc.JdbcOdbcDriver.class;
Properties p = new Properties();
p.put( "user", user );
p.put( "password", password );
// IDS Connections require a little more...
myConnection = getConnection( dbUrl, p );
myStatement = myConnection.createStatement();
catch ( SQLException e )
lastError = e.toString();
System.out.println( "Error during driver initialization: " + lastError );
return( false );
// It worked!
isConnected = true;
System.out.println("isConnected = " + isConnected);
return( true );
}I definitely make the disconnection so the SQL has to execute but still no change in the anticipated field. -
How do i configure DSN connection to database Programmatically
Hi to all,
Can anybody assist me as how could i configure DSN connection to database Programmatically.
Thanks in advance.
Regards
khiz_engHi DrClap,
Many thanx for your advise, i have also done with MS-Access but now i wnated to have with .csv value, how i am going to have this .I have searched the whole JDBC forum already unable to find for .csv
Please provide me and solve my problem
Thanks in advance.
khiz_eng -
Unable to get data (DSN connection)
I've got a report file, created using ODBC connexion with DSN File
These report work fine in design mode using crystal report full (not Visual studio)
When I try to open this report in a .net application I've got the following error :
Crystal Reports Windows Forms Viewer
Impossible d'extraire des données de la base de données.
Détails :
Impossible d'extraire des données de la base de données.
Erreur dans le fichier Postes {A47B5908-2F0A-4A3D-A2A5-A708FEB329EB}.rpt:
Impossible d'extraire les données de la base de données.
Détails :
Which can be translate by :
Unable to extract datas from database
Details:
My database is Oracle, error code 942 means table or view does not exist
In my .net code I use DSN connection (the same as in design mode) like this :
Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo()
myConnectionInfo.ServerName = "my_dsn_file"
For your information this report has been made with CR 9 and converted to CR 2008
In CR 9 everything worked fine.
Any idea ?
ThanksThis Forum edito is buggy ? I had to split my answer otherwise the format is broken
Also you wrote: "User used to create connection (throught DSN) is a generic user, not the user associated with the schema containing the view accessed by the report"
It's odd that this works in CR, CR repsects DB security so if it's not in a schema that user should not have access to anything in Oracle, I'm surprised it works at all. Possibly this is a bug in CR 8.5 and 9 that finally got fixed.
Work arounds, what is the reason you can't add that user account to a schema? Or use an account that has access?
I problably don't use the correct words (I'me not Oracle DBA + translation approximation).
Of course our user "application_user" has right on all the schema of the database, what I want to say it's when you connect to Oracle with a user "application_user" you're connected in the schema corresponding to these user (so "application_user" schema).
And if you want to make request on a table / view from another schema you need to prefix table/view with the corresponding schema (Sale in my previous fictive example)
So in my case CR try to access "CommercialDocument" view in "application_user" schema but this view is not in this schema, it is in "Sales" schema.
The correct way to access it is Sales.CommercialDocument, that what CR throught .net don't do, but do when run directly in CR developers.
Here is real example (fench name inside), those SQL request have been monitoring througt SQL monitor tools of TOAD :
Execution of postes.rpt report directly in CR :
Timestamp: 10:30:03.881
Successful logon attempt (session tag: 0x6464CB8)
username: 'APPLI_HUET'; database: 'DEV'
Timestamp: 10:30:03.881
SELECT VALUE FROM SYS.NLS_DATABASE_PARAMETERS WHERE PARAMETER = 'NLS_CHARACTERSET'
Timestamp: 10:30:03.896
SELECT VALUE FROM SYS.NLS_DATABASE_PARAMETERS WHERE PARAMETER = 'NLS_NCHAR_CHARACTERSET'
Timestamp: 10:30:03.975
SELECT "POSTES"."N_POSTE", "POSTES"."LIB_POSTE", "POSTES"."N_ETAB",
"POSTES"."N_ATELIER", "POSTES"."TPSID", "POSTES"."DT_DEB_ACTIF",
"POSTES"."DT_FIN_ACTIF", "ETAB"."ETAB" FROM "COMMUN"."ETAB" "ETAB" INNER JOIN
"GESTION_DES_TEMPS"."POSTES" "POSTES" ON "ETAB"."N_ETAB"="POSTES"."N_ETAB"
WHERE "POSTES"."N_ETAB"=2 ORDER BY "POSTES"."N_POSTE"
Timestamp: 10:50:29.178
Logoff (session tag: 0x6464CB8). -
DSN connection not available in connection manager
Hi -- I am having problems connecting to an ODBC data source with SSIS.
I am trying to connect to a mysql database. The connection is set up in "Administrative Tools" as a System DSN, and I can sucessfully connect using "Test" from there.
But the connection is not shown as available in SSIS.
In Connection Manager, I create a new ADO.NET connection, choose New, ODBC data provider, but my system DSN connection is not in the dropdown (no ODBC connections are), and if I try to specify it with a connection string
Dsn=ConnectionName;
I get:
Test connection failed because of an error initalizing provider. Error [IM002] [Microsoft] [ODBC Driver Manager] Data source name not found and no default driver specified.
I have tried recreating it, creating a new data source with a new name, but none of the Dsn's come are seen by SSIS.
To make it more frustrating, it was working just days ago and I don't know what changed...
Any help appreciated,
MikeThe BIDS development environment is 32 bit. So it looks for the 32 bit providers at design time. However, when the package is run in BIDS, it will use the 64-bit providers, as long as the Use64BitRuntime property of the project is set to TRUE.
Outside of BIDS, which set of providers is used depends on which version of DTEXEC you run. There is a 32-bit version and 64-bit version - each will load the matching provider. Something else to be aware of - not all providers have 32- and 64-bit versions. The Jet providers (used for Excel and Access) only have 32-bit versions, for example. -
Automatically create ODBC DSN connection with special port and password. Add-OdbcDsn cmdlet
Hi,
I first posted a question in the SQL forum but I'm posting it here instead because its a Powershell question.
In a non-persitent VDI enviroment we are trying to automatically create a ODBC DSN connection to a SQL server.
We are using Windows 8.1 so we also have Powershell 4 together with the add-odbcdsn cmdlet.
But when trying to add set -SetPropertyValue for network port different than default and a password we get an error.
here is the command:
Add-OdbcDsn -Name test -DriverName "SQL Server" -DsnType User -SetPropertyValue @("PWD=test", "SERVER=10.0.0.1")
and here is the error message:
Add-OdbcDsn : Attempt to set the {UID or PWD} key of a DSN. These keys should not be stored in the registry for securit
y reason. Provide the credential information at runtime via SQLDriverConnect, SQLConnect or SQLBrowseConnect.
At line:1 char:1
+ Add-OdbcDsn -Name test -DriverName "SQL Server" -DsnType User -SetPropertyValue @ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (MSFT_OdbcDsnTask:Root/Microsoft/...SFT_OdbcDsnTask) [Add-OdbcDsn], Cim
Exception
+ FullyQualifiedErrorId : MI RESULT 4,Add-OdbcDsn
NB!: this command does not contain a port number, but when adding it without a password(PWD string) we just the default port.Hi Primeid,
Agree with Jrv, we cannot store UID and PWD in an ODBC datasource, For example, you can create a DSN using the user interface but if you look at the DSN stored in the registry the UID and PWD are not stored.
ODBC it is always required when you connect using a DSN that the caller supply UID and PWD if they want to use standard login during connection time.
These similar discussion are for your reference:
Creating ODBC DSN for SQL Native
Client fails for not-integrated authentication
is user name and password required in ODBC admin / User DSN?
In addition, to read data from a SQL Server database using an ODBC DSN with SQL Authentication via powershell, please refer to this script:
Open SQL database with ODBC DSN and SQL AuthenticationIf
there is anything else regarding this issue, please feel free to post back.
If you have any feedback on our support, please click here.
Best Regards,
Anna Wang
TechNet Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected] -
Issue with creating oracle ODBC DSN connection
Hi all,
We have BO X! 3.1. We have created some webi reports. Our universe connection is created using following method.
= Created a DSN connection for oracle 10g database
= created Bo connection object by selecting Generic ODBC connection
= in the service name we have given DSN name and tested successfully.
we have created reports universe under Windows environment.
= Now we deployed Biar file of the same on SOLARIS server.
We have created odbc connection in odbc.ini on solaris.
we have used path "/../boxir3/bobje/odbc.ini"
We have used "/BOXIR3/bobje/enterprise120/solaris_sparc/odbc/lib/libsqora.so.10.1" driver
But when we test connection after deployment connection fails. giving error
" A database error occured. The database error text is:. (WIS 10901)"
Can anybody suggest me right method to create ODBC connection for oracle 10g on SOLARIS.
Thanks in advance.
SaurabhHi Saurabh,
You said your odb.ini is at the location "/../boxir3/bobje/odbc.ini". Verify if environment variable ODBCINI is pointing to this location. For this do a echo $ODBCINI. This should return the path of your odbc.ini file. If this command returns empty, that means this variable is not set. In this case you will have to set your ODBCINI using the below command.
If you are using bash shell
export ODBCINI=/../boxir3/bobje/odbc.ini.
if this does not work try
set ODBCINI=/../boxir3/bobje/odbc.ini
Thanks
-Anup- -
Hi All,
I have a report that needs to connect to a local( to the server) DSN Connection on the Crystal Server 2008 and am having difficulty viewing the report. I am getting connection errors. My question is: How do I configure the report under "Database Configuration" to get it to connect to the DSN Connection on the server?
Thank you in advance.Create the same DSN or the datasource name as on the server and update in Crystal reports using set datasource location. What database is it pointing to?
Thanks! -
DSN connection across different environments
Hie Guys,
A database has 3 different servers for DEV, TEST & PROD. Now, while creating a DSN for the Universe, do you have to create a DSN for each environment (Dev, Test & Prod) ? How does this work? Could anyone please help me understand the concept? Thanks.Hi
If you have three SQl servers (Dev,Test,Prod ) and three bo servers (Dev,Test,Prod ) you need to create three different DSN connections in Dev SQL.
IN THE DEV SERVER
1. Create DSN connection (Dev DSN Connection) in the Dev SQL to connect Dev SQL to BO Dev and then develop the universe.
2. Create another DSN connection (Test DSN Connection) in the Dev SQL to connect Test SQL to Test BO Dev
3. Create another DSN connection (Prod DSN Connection) in the Dev SQL to connect Prod SQL to Prod BO Dev
Then while promoting to Test environment, you need to send universe along with connection, but in the connection you need to change the Dev SQL connection to Test SQL connection ((Test DSN Connection) (Select the connection -> Click on change connection)
Then while promoting to Prod environment, you need to send universe along with connection, but in the connection you need to change to Prod SQL connection (Prod DSN Connection)
And once the universe and connection are promoted successfully come back to Dev and change the connection to Dev SQL (Dev DSN Connection) -
Simple cfquery dsn connection...
Hi,
Still struggling to get a DSN connection working on a GoDaddy
server. This works just fine on my local machine with testing
server running, but I just want to make sure I'm not missing
anything that would be required for this to work on a remote
server. I've built a couple practice CF sites locally, but this is
my first attempt to publish one.
Anyway, here's the cfquery:
<cfquery name="rs_TEST"
datasource="mysqlcf_oldoakstesttwo">
SELECT *
FROM table01
</cfquery>
Just a simple request to return records from table 1 of a
sample database. The DSN is the name GoDaddy's control panel
assigned to my database. I created a DSN with the same name
locally, and it works. I get a security error when I publish. From
what I understand, GD doesn't require a username or password in the
DSN connection, but I tried that anyway... still no dice. I'm
really starting to suspect the problem is on their end, but just
want to make sure this should work.
So, does it look ok?
Thanks guys...
JoeI would contact godaddy and tell them the security error you
are getting.
The <cfquery> is fine
Ken Ford
Adobe Community Expert Dreamweaver/ColdFusion
Adobe Certified Expert - Dreamweaver CS3
Fordwebs, LLC
http://www.fordwebs.com
"StearmanDriver" <[email protected]> wrote
in message
news:ga2inq$123$[email protected]..
> Hi,
>
> Still struggling to get a DSN connection working on a
GoDaddy server.
> This
> works just fine on my local machine with testing server
running, but I
> just
> want to make sure I'm not missing anything that would be
required for this
> to
> work on a remote server. I've built a couple practice CF
sites locally,
> but
> this is my first attempt to publish one.
>
> Anyway, here's the cfquery:
> <cfquery name="rs_TEST"
datasource="mysqlcf_oldoakstesttwo">
> SELECT *
> FROM table01
> </cfquery>
>
> Just a simple request to return records from table 1 of
a sample database.
> The DSN is the name GoDaddy's control panel assigned to
my database. I
> created
> a DSN with the same name locally, and it works. I get a
security error
> when I
> publish. From what I understand, GD doesn't require a
username or
> password in
> the DSN connection, but I tried that anyway... still no
dice. I'm really
> starting to suspect the problem is on their end, but
just want to make
> sure
> this should work.
>
> So, does it look ok?
>
> Thanks guys...
> Joe
> -
Unspecified error (ASP DSN connection)
I am using Dreamweaver CS3 , XP, MS Access and IIS6 and IE7 on host machine and IE6 on another.
I have a DSN connection
My problem is that the connection works fine once or maybe twice, I then get the unspecified error pointing towards the connection string, I can also get the 'file in use' error sometimes instead. To clear this I have close down and restart dreamweaver in order for localhost to display the page.
I get the same error when browsing from another machine.
IUSER has correct permissions on db folder.
I thought I had sorted the problem out by adding UID='';PWD= ''; to my connection string as it worked fine for sometime, but I created a new asp ( Classic) page and it has gone back to only displaying once before server error again..
This all worked fine on my old win 2k machine and also on the live server, the only difference I can see is that I was Administrator on my old machine but I'm only a power user on this XP PC, could this be the problem?
any help appreciated.Please post your question to a Database forum; someone there should be able to help you.
http://forums.oracle.com/forums/index.jsp?cat=18
PS - Messages in ALL CAPS are hard to read. -
Hello All,
I am getting this error while I am connecting my access database website for the change
"This database was connected to a Microsoft Access Services site that is not compatible with this version of Microsof Access. You cannot make design changes or modify data in database."
I am using SharePoint 2010 and Microsoft Office 2010.
I have created one Contact Database Site and now I am trying to modify the layout of the form in Access. and I am getting the error that I have mentioned.
Please provide help on it.
Thanks in Advance....Hello All,
I got the answer, we have to enable the port 80 or where the access service is deployed and we have to change Trust setting and also, enable the macro from Access.
Hope this will help to other.... -
ORA-01031: insufficient privileges from auxiliary database while connecting
i am getting this error ORA-01031: insufficient privileges from auxiliary database while connecting plz help.
TNS-01106: Listener using listener name VINAR has already been started
[oraclone@server VINTEST_server]$ tnsping VINAR
TNS Ping Utility for Linux: Version 11.1.0.7.0 - Production on 17-JAN-2013 19:10:49
Copyright (c) 1997, 2008, Oracle. All rights reserved.
Used parameter files:
/d04/oraclone/db/tech_st/11.1.0/network/admin/VINTEST_server/sqlnet_ifile.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=server.csacons.com)(PORT=1571)) (CONNECT_DATA= (SERVICE_NAME=VINAR) (INSTANCE_NAME=VINAR)))
OK (0 msec)
[oraclone@server VINTEST_server]$ rman target sys/change_on_install@VINAR auxiliary /
Recovery Manager: Release 11.1.0.7.0 - Production on Thu Jan 17 19:11:38 2013
Copyright (c) 1982, 2007, Oracle. All rights reserved.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-01031: insufficient privileges
[oraclone@server VINTEST_server]$ sqlplus sys/change_on_install@VINAR as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Thu Jan 17 19:31:52 2013
Copyright (c) 1982, 2008, Oracle. All rights reserved.
ERROR:
ORA-01031: insufficient privileges
Enter user-name: sys@VINAR as sysdba
Enter password:
ERROR:
ORA-01031: insufficient privileges
Enter user-name: [oraclone@server VINTEST_server]$
[oraclone@server VINTEST_server]$
SQL> select * from v$pwfile_users;
no rows selected
SQL>
listner.ora
SID_LIST_VINTEST =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME= /d04/oraclone/db/tech_st/11.1.0)
(SID_NAME = VINTEST)
#(GLOBAL_DBNAME = VINAR)
#(ORACLE_HOME= /d03/oravnr/db/tech_st/11.1.0)
#(SID_NAME = VINAR)
(SID_DESC =
#(ORACLE_HOME= /d04/oraclone/db/tech_st/11.1.0)
#(SID_NAME = VINTEST)
(GLOBAL_DBNAME = VINAR)
(ORACLE_HOME= /d03/oravnr/db/tech_st/11.1.0)
(SID_NAME = VINAR)
tnsnames.ora
VINTEST=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=server.csacons.com)(PORT=1591))
(CONNECT_DATA=
(SERVICE_NAME=VINTEST)
(INSTANCE_NAME=VINTEST)
VINAR=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=server.csacons.com)(PORT=1571))
(CONNECT_DATA=
(SERVICE_NAME=VINAR)
(INSTANCE_NAME=VINAR)
kind regards
plz helpPl do not post duplicates - ORA-01031: insufficient privileges from auxiliary database while connecting
-
"Unable to connect to the database" when connected to corporate network
Hi
Installed Primavera P6 V7 and Oracle 10g in Stand alone on XP 32bit machines with SP3. When our machines are NOT connected to the corporate network it works fine.
However when connected to the network we can not access the locally stored database. We get message "primavera unable to connect to the database. would you like to configure the database connection now"
Database on servers that we set up are fine regardless.
If we connect machines to just the internet, again no issues.
So something is stopping Primavera opening local database when connect on our corporate network.
Any ideas please?
ThanksThis may be a long shot but look into how your TNSNAMES.ora file is being distributed on the domain (or are you possibly utilizing LDAP.ora on the domain side?).
Some time ago I remember a company scripting an ENV variable on domain logon that altered where the Oracle client would pull the TNSNAMES from.
Maybe you are looking for
-
Trusted RFC and Remote logon not possible due to Nat'd IP addresses
Hi, We are trying to connect our SolMan 4 to our cusotmers ECC 6 and BI7 systems, the systems are off site and the IP addresses for the customers systems are nat'd when they come in and go out from our Network. The problem we get is that we cannot se
-
Republish iweb 1x pages in iweb 2x
How do I republish iweb 1x pages to iweb 2x? I copied the domain file for my old sites before I upgraded to iweb2. I tried copying this file into the users library file. Nothing happens. ANd I don't see my old pages. Thanks, Fielden
-
ADD chek num to incoming payment form
Hi, I added a user column to incoming payments matrix. I tried to insert the cheknum in that column but i see any change. i debgged my code and so that the adding operation is correct. I tried to enter a value using the keyboard in that cell and i no
-
Full Screen Panning over Dual Monitors
I have a pretty quick and upfront question. I would like to plug in two projectors to my Powermac, and then full screen a movie and have it span over both monitors. My movie is basicly double HD (2560x720) (two 1280x720 movies combined side by side).
-
I have an ipad 2, ios7 will not download. I keep getting an error message that just tells me ios wont install, however it does not tell me why. Any suggestions? Thanks