I have an application which is connected to a game server.
Each time it receives an item, it shows this as "User gave you item at . Transaction ID# 1kl9d4ns."
I would like to store this data in some sort of lical database file (not using an SQL server), and then be able to generate a report (crystal report or any other reporting module). Preferably exportable to PDF files.
Is this at all possible?
All examples I find are using some sort of database connection.
Could anyone please point me in the direction of a good tutorial that works with local files instead of connecting to an SQL server?
Thanks
Related
Using: Microsoft Visual Studio 2010. SQL Server 2008. Report Viewer
2010
Hey everybody, hope you doin' great!, i'm actually having a hard time going through a complicated moment at my thesis developing.
Okay, let me explain it to you.
I designed reports on my software, on localhost they work perfectly but when I tried installing the software on other computer I'm getting an error when trying to open one of the reports.
The error is not controlled by the application, it says something like
"Error related to the network while trying to stablish a connection with the SQL Server, the server couldn't be found or it was unreacheable."
The thing is, on the form I got the report I'm Filling the ReportViewer with this.
this.UsuariosAtendidosTableAdapter.Fill(this.DB_SUBSIDIOS_MUNICIPALIDADDataSet.UsuariosAtendidos, fecha1, fecha2);
this.reportViewer1.RefreshReport();
DB_SUBSIDIOS_MUNICIPALIDAD is my Database.
UsuariosAtendidos is my Procedure.
fecha1, and fecha2 are the two needed fields to fill the stored procedure.
Moving on, on my RDLC I'm calling the stored procedure from a DataSet which provides of all the procedures.
The thing is that when installing it on other computer it seems like it CANT or its UNABLE to access that DataSet because its on my computer.
So the questions are:
How am I supossed to fill the report without using a local dataset?
PS: Sorry for my bad english, isn't my fluent lenguage.
You should also have a SQL Server instance with the database of interest on this another computer or you should change the connection string to point to your original computer, these two computers should be on the same network, SQL Server on the first computer must be started and available
I have a Live database on Server1 on which data is feeded frequently (daily). I need to access this on different server (Server2) which needs to be updated every week with the data from Server1. How do we do this?
I have no idea of how to begin. A bit of investigation helped me know about Sql Job Agents, but I need to do this using code (preferably C#) , so that data updation occurs automatically on the destination server.
Can someone please tell me other ways to do this?
Currently I have to manually take backup from server1 and restore it on server2. How can we automate this?
I have a very unusual problem. I made a project in C#.net in vs 2008 and SQL server 2005.
I have two DB to use.
Now, the problem is whenrunning the project on my PC it works fine, but when i install on users PC, through setup, im getting a exception handler error , when im trying to save any data in either of the DBs. However i tried to insert data through INSERT INTO coomand in sql it works fine. And i have no problem in retrieving data.
So any one can help please do.
Thanks in advance
How are you specifying your connection to the database(s)? If you're doing windows authentication, most likely your user's accounts don't have permissions on the database. It could also be that they can't see the database from where they are on the network.
I'd start by pinging the DB server from the user's machine to make sure they can even access the server.
I have a nice program idea, it will be a very simple application that will save your username and password on a sql server database file, i know how to do it, but the problem is i don't want the client to install sql server in order to add or remove a record in database, besides i want my database file embedded into the application so the user have a single .exe file, i heard about a library called sqllite or something, it`s function is not to let the user install sqlserver to make the application work.
You can use SQLCE and search for SQLCE private deployment, basically it is a light weight of MS SQL on client side. With privatedeployment you just need to copy related DLLs to your project folder without installation.
You are looking for SQL Server Compact edition.
You need to use a file based SQL database.
There are several - most popular are:
SQLite
SQL Server CE
See this SO question - Free portable database.
As you mention, Sqlite is an option. It's a compact and file based database. No need for installing anything. The full database resides in a file. You'll need to reference the Sqlite database engine for connecting to it, however.
I probably wouldn't use SQL at all if you are only going to create one table with a few (< 100) rows. Its way to much overhead for that small amount of information.
I would save the username and password in a file, then use the Enterprise Libraries Cryptography Application Block to secure the file.
You also most likely don't want the storage engine embedded into the exe, then your passwords are tied to that specific application on that specific computer. You will have to implement an import/export program anyway to move your info to another machine.
Check out http://keepass.info/
Yes , you can implement it by
SQLite ,
SQL Server CE ,
Or Xml
And also , in my last project , the application call the webservice when need to access DataBase.
So , there are lots of ways to avoid install SQL Server on client PC .
I'm a dektop developer and don't know much about how webhosting work... So please help me here.
currently my app works with MSSQL database which is installed locally on the same machine.
Now I need to go wider and let multiple apps work with the same database over the Internet.
I have a webhosting with CPanel in it and MySQL database.
Please tell me how I can access tables in that MySQL database from my another computers?
Select and update records in that table. Do I have to implement some functionality using PHP to make such requests?
Please advise..
Exporting raw MS-SQL dumps will probably not work if you try to import into mySQL because there are some differences in syntax. There are commercial programs available that will help you migrate data, otherwise it might be better to code a PHP program to export from MSSQL to mySQL.
But your question sounds more like you're asking how to access databases remotely.
.
PHP can do this natively. When you create your link to the database you specify the host. For example: $databaseConnection = new mysqli('username','password','host_ip_address');
If you're coming from MSSQL you may hit some snares.
To allow remote connections on MS-SQL you use the "surface area" configuration tool. You'll probably find that your mySQL database server is already configured to allow remote connections, if not you'll have to take that up with your host (sounds like you don't have your own box).
The next trick is to remember that usernames in mySQL look like this: 'user'#'host'.
cPanel hosting usually has PHPmyAdmin installed. Open it up and look at the user table in the mysql database (the actual database named mysql running on the MySQL server).
You'll see a host column. So if your 'root' user is only set to 'localhost' you won't be able to login as that user from another machine. The wildcard symbol is %. You can read this up here - http://dev.mysql.com/doc/refman/5.5/en/adding-users.html
Of course the same rules apply to mySQL when it comes to users. Don't use your root account to access sub-databases, rather assign new users which only have the required permissions. Also consider using non-predictable usernames. That doesn't really answer your question (sorry) but it's worth mentioning while you're looking at the user table.
So to finally answer your question:
1) login to cPanel and create your database 'foo'
2) Run SQL command:
GRANT ALL PRIVILEGES ON foo.* TO 'secretuser'#'%' IDENTIFIED BY 'longpassword'
Then PHP code would look something like this:
$host = 'ipaddress or hostname';
$mysqli = new mysqli('secretuser','longpassword',$host,'foo');
// look in php.net for error handling
$query = "SELECT * FROM tablename LIMIT 0,10";
$result = $mysqli->query($query);
The reason I put a limit there is because you're probably used to "SELECT TOP 10"
You would have to export the data on your computer into a raw SQL file, and then using a the PHPMyAdmin control panel you could import it. Assuming you are also using PHPMyAdmin on your own machine there is an 'Export' tab along the top. If you click on that you will have the option to export all your tables to a .sql file.
From there you then need to access PHPMyAdmin via CPanel. Once in you can then hit the 'Import' tab and upload your file to get all the data into the database. To interact with the database online you would need to use the inbuilt functions in PHP - the MySQL Reference on PHP.net is very useful. you would then be able to access the database from any computer using the PHPMyAdmin control panel.