I have database on localhost. Now I want to install some web application which needs an empty database (for example "myapplication").
How can I create such database in PhpStorm 9?
I only found the way to open the SQL-Console (CTRL+SHIFT+F10), and create in manually by entering SQL command:
CREATE DATABASE myapplication;
Ok, is not much to write, so maybe no need to have a GUI for that ?! :)
Related
I recently developed a winform application with c# and SQL Server 2008 data access. I want to create an "InstallShield express" setup file for it (I don't want to use ClickOnce or Setup And Deployment witch is available in VS). I want to create a db or attach it to SQL server instance after installing SQL Server Express 2008 SP3 (not local db). What is the best way to do this?
Your question is quite vague as you do not explain what kind of “app”, “setup file” or “db” you are using, nor how you “attach it to sql”. In the future, please include these details. However, I can give a general answer.
Create a seed database, that contains the starting data for your application, in your source project.
Add the seed database file to your project/solution file and set its Build Action to “Content”.
Ensure your installer includes project content in the deployment folder (the application folder for WinForms apps).
To open the seed database from your app, use a connection string like Data Source=|DataDirectory|seed.sdf. Do not try to search for your seed file or to set DataDirectory yourself; the installer will set DataDirectory to the directory your content was installed to.
Do not try to write to DataDirectory; it may not be writable by the user who installed it. Repairing the app will overwrite DataDirectory, destroying anything you saved there, as well.
If you need to save data in the database, copy |DataDirectory|seed.sdf to Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), then read and write all data to the copy.
For more information, read my answer to a poster who wrote to |DataDirectory| and therefore kept destroying his user's data.
I would like to ask, if it is possible to get my database from an offline (not functioning) xampp ?
You see, I have backed up my database earlier but I am not sure whether there are all the data I need now and the DB is pretty big (like 50 tables). I wanted to go for a local implementation of apache, mysql and PHP for my web applications. So I have reinstalled mysql and want to use my own local apache server instead of xampp.
I would like to know where can I find some .sql or something that is stored in xampp that could be otherwise accessible via the phpmyadmin? Is it even possible? I have scrolled through the xampp folder and tried to figure out where it can be, but didnt find anything though.
Thanks for help.
EDIT
I am on a mac running mavericks.
First go to localhost/phpmyadmin and create a database as before you have. Then import your database file through browse.
If your database name exmaple.sql then create database name will be example and import example.sql
We want to migrate written 4gl programs (with their .per, form files) to Genero Studio so it can be with Windows Forms. How could we create a connection so the .4gl files can retrieve the needed databases? I just want to connect to it, I don't want to copy paste the whole database to my PC. Is there any tutorial step by step? The Genero Documentation is giant and not very clear. Maybe it is if your starting from nothing, but we already have written programs that we just want to make more visual with Windows Forms.
In your Genero Studio configuration, there should be a list of environment sets listed. One of them should be for your backend. Make sure it is configured properly. Then make sure it is checked for your preferred configuration.
There are different ways to connect to a DB, make sure you review the following doc:
http://www.4js.com/online_documentation/fjs-fgl-manual-html/User/Connections.html
From there, I would write a simple BDL program to test:
main
define mystatus smallint
database mydb # this is where you can adapt based on your preferred connection method
end main
Make sure that in your environment set, Debug is check since this will provide SQL driver debug info (FGLSQLDEBUG=9)
From there, check your output panel and see what needs to be configured
When the connection is working, you can extract a schema (needed at compile time) or maybe you already have a schema (.sch file) already created that you simply want to import
I am creating a database with Entity Framework 4 and Visual Studio 2010.
I am fine with the first steps - I am going model first, so I successfully created the model and now there is a valid .edmx file in my solution.
My goal is the following: I want to generate the database and add it to the solution so I can give the solution to another person and they will be able to build it and run it - I do not want the database connection be dependent on any of my local settings, and I do not want them to have the need to recreate the database, it will have some 'seed data' in it. That should be possible, I saw similar solutions.
I would appreciate advice on how to do that.
Use SQL Server Express and put database files to App_Data directory (for web application) or make them solution items copied to output for other application. Change connection string to attach the file - it should look something like:
AttachDbFileName=|DataDirectory|\YourDB.mdf;Initial Catalog=YourDB;Integrated Security=SSPI
I installed db2 client in my system for personal use. I am not able to understand from where to create the database so that i can create tables on that db and play around with sql queries as of now.
This is totally related to my personal use and learning purpose.
Please inform how to create a dummy database and play around with it with db2 client?
Regards,
Are you on Windows? Are you using DB2 Express-C? I'm assuming you are, since you say this is for personal work.
After you have the DB2 binaries installed, you should have been prompted with the "DB2 First Steps" application, where you could have the application go through a GUI to create the database for you. If you missed it, you should be able to find it in your start menu with Start -> Programs -> IBM DB2 -> DB2COPY1 (Default) -> Set-up Tools -> First Steps.
If you prefer the command line, you can use the following:
First, determine if your installation created a default instance (on Windows, this will be called DB2) by using the db2ilist command. In the DB2 Command Window, if you're not on the instance you want to create a database in, you can switch with the following command:
set db2instance=DB2
Be sure to not include spaces around the equal sign.
Now, in order to create a database in the current instance, you use this command:
db2 create database mydatbase
For further reading, IBM has produced a Getting Started ebook, and I would highly recommend you check it out!
The DB2 client is just that - a client only. It does not include the database engine.
To create a database you have to install the server. The server includes the client portions.