I'm looking to write a command-line program that can execute database scripts against an Oracle server, however the machine the program will be run on may not have an Oracle client installed on it. I also don't want to rely on a language that requires a VM as there's no guarantee that the VM will be installed, so a language like C is preferable for this. Is there a way that I can statically compile/build this program and not have to have the user install the Oracle client on that machine? I'm trying to be as unobtrusive as possible.
Thanks.
My first guess was to use JDBC (type 4 driver) since you do not want a VM based language, it is out of the question.
SO, I think you should take a look at instant client
http://www.oracle.com/technology/tech/oci/instantclient/index.html
(thanks to google)
Related
I am attempting to use a Packaged Solution for my Access 2010 application that has its backend linked to SQL Server. At the moment, I'm using the .accdb file as the frontend, and I would like to distribute my application to some other Windows computers, but the Packaged Solution does not work. I had the package include Access Runtime, so their version of the frontend is running on Runtime and not full Access. However, once the application makes a request to the backend, the application does nothing, as I am not even prompted for the SQL Password as per usual with the full version. I've read on about including a .dsn file in the package can secure the SQL connection (see here), but going through steps of other tutorials to create .dsn files hasn't led to any results. Would anyone know how to correctly generate the .dsn file or if I've done something else wrong at this point?
(And yes, I understanding using Access 2010 in the year 2019 is almost a joke at this point, but I'm doing this for testing purposes. I plan to completely remake the frontend in Angular in the future.)
One other unrelated note... would it be a better idea to have the frontend hosted as a .html file like through the "Publish to Access Services" process? I did read that Access Services was discontinued last year, so would that not be possible?
Edit: This is not a duplicate of "DSN Less Connection (MS Access to SQL2016)" because A) I want to utilize a DSN Connection, not DSN-less and B) I am not using connection strings in my code to hook up with SQL.
You should be able to just create FILE dsn, link your tables, and then distribute the compiled accDE to each desktop.
However, what SQL odbc source provider did you use? If you use the SQL server ODBC provider, then that is by default installed on each computer.
However, if you linked using Native 11 (or later), then that driver is NOT installed on each workstation by default. So, I HIGH recommend you create a FILE dsn (not a user or system DSN), and link the table using that. (Access will create DSN-less links for you)
And you should NOT be seeing a logon prompt with your application. This suggests you forgot or missed the save password option.
So, I would re-link your tables, creating a new FILE DSN. And if you using the linked table manager, then make sure you check the prompt for new location to force creating of a NEW DSN. If you just re-fresh, then you DO NOT get a chance to click on the save password option during the linking process.
So, what odbc driver are you using? The native 11 or later are better, but they are not installed by default on each workstation. However, CAUTION is required here, since the older sql driver does NOT support the newer datetime2 formats. If you used these newer sql column types, they will be returned as string data types in Access and create a mess of issues.
So, first, I would re-link using a FILE dsn.
Make sure you check the save password during the re-link.
You then compile your accDB into an accDE, and then distribute that. You don’t really need to use the package wizard, since once each workstation has the runtime installed, then a simple copy of the accDE to each person’s computer will thus work fine. There is NO special connection between your accDE and the package wizard. Once the runtime is installed, then any and all mdb, accDB, and your accDE can simply be clicked on to launch + run. So for testing, you can skip the package wizard, and just copy the accDE to the target machine, click on it, and see if it works.
Edit
The prompt and check box during this process is this:
So you have to check that box to save the password. Note that you ONLY get this dialog WHEN you create a new FILE dsn.
I have an application which uses the OCI 7 API. This application is successfully deployed on a variety of configurations like
WS2003/Oracle9 and WS2008 R2/Oracle12 (r1). I am now trying to deploy the app on WS2012 R2 but I am facing a frustrating issue where the application crashes with an illegal access somewhere in oranls12.dll. This makes think that it has something to do with the locale and/or system variables. I have checked that the NLS_LANG system variable is set as the same the database uses which is AMERICAN_AMERICA.WE8MSWIN1252.
I have tried using the binary which I know works on WS2008, and I have also compiled it on WS2012. It still crashes. Does anyone know what is wrong, or have any pointers on how to debug this properly?
Any details needed I will provide.
To answer the comments below, the app uses the OCI 7 API, which is still provided with the newer drivers. The app itself is compiled against OCI 12. The database running on the server is Oracle 12.1.0.1.
I'm working currently on a windows form application which uses a Database, and i want to use MS SqlServer, now i need to know how to make it local based..
In other words : after publishing the app and install it on another device, it'll crash because of the database not found and the connection string also not right.
I've find on many threads a way to copy the md5 file from SqlServer directory to the project files and change the connection string to local, but it didn't work properly as it is still crashing on other devices, so what should i do in this case ?
Also is there any software i should install it on other devices in order to use sqlServer commands (like .Net Framework..etc), and also what is SqlServer Express ?, is it the thing i'm looking for ?
Please explain in details, Thanks in Advance.
I am using SQL Server Compact 4.0, so far so good
http://en.wikipedia.org/wiki/SQL_Server_Compact
Basically you need to create DB file and carry it over to destination machine with some additional assemblies.
You can download it from here:
http://www.microsoft.com/en-us/download/details.aspx?id=17876
There is also extension for Visual studio that allows you to work with it using designers. With it you can use Entity Framework which.
http://sqlcetoolbox.codeplex.com/
I'm a novice trying to install Postgresql on Cygwin as a service. I have been following the steps listed in this URL: http://www.smartpixie.com/wiki/Tech/CygwinPostgreSQL.twiki.html
Everything was working fine until I got to the step where I had to create a user and a database for myself, in my /usr/sbin directory the "createuser" file exists but the "createdb" file does not. So, as suggested by the steps, I attempted to connect to the database as the SYSTEM user and then create the database/user roles later. However, I come across this error whenever I try to connect to the database.
$ psql -U SYSTEM postgres
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Any help is appreciated, thanks.
First, I would recommend against running PostgreSQL over Cygwin. There isn't a real use case I can see since there is now a native port and Cygwin ends up adding quite a bit of overhead to things like IPC calls. You won't get good performance out of it, and I can't actually think of any case where cygwin would be a better fit than mingw for c-language stored procedures. So please question whether this is really a requirement and explore other options first.
Now if you still need to do so, the process isn't easy, but is documented at http://www.postgresql.org/message-id/3DC76EA4.7090503#usa.net
Basically you have to install the ipc service first, then use cygrunsrv to create a Windows service for PostgreSQL dependent on it. Then you can run net start ipc-daemon and then net start postgresql
Situation:
I have a program written in VB6
The source code of the program is not available
It connects to a database using ODBC connection string.
The vendor setup a connection name to the database when the program was first installed 6 years ago
My machine crashed, all the settings are gone!
The program vendor is out of business. Even they don't have the source of the program now.
Question:
Can I find the ODBC connection name in anyway?
You can use Process Explorer to catch the connection string your program is trying to open. You can find almost everything a program is doing, and you can filter what information is captured/displayed.
I'm not sure I've understood. What exactly happens when you try to run the program? Is the problem that the ODBC connection string was lost because the settings were lost when your machine crashed?
If so I would try the following.
Look on a backup for the configuration file of the VB6 program. It may be an INI file.
Do you know what the database is? Is it an Access file (*.MDB), SQL Server, or what? You may be able to recreate the connection string from scratch. You might have problems if you need to supply a password.
Are you still in contact with anyone from the vendor? I'd have thought whoever originally wrote the program would be best able to help, and might be willing to do a couple of days consultancy.
Can't you use a decompiler?
You can probably run an ODBC trace and then look in the log file to see what the attempted name was. Run odbcad32.exe and go to the trace tab and turn it on. Run your app and then look in the log file (probably at the SQLConnect call).