I am having the following problem. I am creating a C# windows Forms application with which i want to transfer the data from a SQL Server to MySQL. The problem is that the data in the SQL is in latin and when i trasfer it in the MySQL DB it is shown like "?". Please give me some advice. I have tried to convet it but it does not work!
thanks in advance!
How are you selecting the data - using a sproc or sql command?
You can put a collate in the query (see : MySql Manual Ref) and force the correct collation back to your app (if reading from MySql or MS SQL both support it). This is easier than trying to convert (which does not always work as character sets are different sizes) or changing the db charset/collation.
Related
I have an oracle database. I connected to the database with odac (ODP.NET) and in query window I made an easy test:
select * from abc.groups;
after I check this in Toad for Oracle.
The query window contains 192 record, and the toad contains 352 records.
I tried to find some special lines, for example:
select*from abc.groups where id=15;
I couldn't find anything in query window, but I found it in toad.
There is a same database, same log in details.
In C# the date handling is not always correct where is the problem?
I have a complicated issue to solve.
Basically i have a winform application which uses datasets and access files to save data.
Now i have a customer which would like to have the database stored on a sql server.
So .. i made the database in sql and an mdb file with odbc tables attached to it.
And here is the issue.. The program works only in reading and inserting new data. When the user tries to update an existing row the tableadapter goes in concurrency exception.
I can't really understand the reason or how to solve this.
Anybody got any idea or any tips about this issue?
Thank you!
I am using a SQL Server Compact database for a project I am working on and have been having a hard time trying to insert data to the database.
My insert statement and everything is working fine and data gets inserted too and I can even do searches for the inserted data (while in the application).
The problem I am having is when I quit and re-run the application, it seems that the data was not inserted into the database and the tables are empty too.
Can anyone let me know where I am going wrong with this?
Thanks
Could it be that the SDF file is overwritten with an empty version whenever you rebuild/run the application?
As Thorsten pointed out, check the Build Action on your SDF file.
I am working on Windows Forms Application with SQL Server Database. Now I have to convert the SQL Database to MS Access database as per the requirement. Can any one help me out
how to convert SQL database to MS access database so that, I can access the same tables.
Thanks & Regards,
Vani.
You can use MS SQL management studio to export tables data and structure to access. To do this right click on you db in Management studio and select Tasks -> Export data. Now follow the steps of the wizard. First you'll select the source - it would be you db, next destination - it would be an access file. And there you go :) Have fun!
As Elastep says, you can export data from MS SQL Management Studio - but that will only get you to .MDB-files; ie. prior to Access 2007. The steps below works both for 2007 and prior (although the actual path to execute them may vary in the different versions):
In Access you can import the tables from SQL Server - when in your target database in Access, choose External Data --> More --> ODBC Database. In there you can set up a connection to the SQL Server and choose between Import the source data and Link to the datasource. After selecting either, you can choose the tables you wish to import/link.
If you import, the data will be copied physically to the Access-file. It sounds like this is what you want to achieve.
However, as comments above suggest, this sounds off. Are you sure you want to move your data to a weaker engine? If you do want to keep the data in the SQL Server, whilst using Access only for forms, etc. you can link the tables instead. This way, you can use the rapid-prototyping, datacentric tools in Access, while keeping the security, consistency and scalability of the SQL Server.
For reference, you might want to take a look at this: http://office.microsoft.com/en-us/access-help/import-or-link-to-sql-server-data-HA010200494.aspx
What is the easiest way (without installing extra drivers) to open a FoxPro DBF table and link it to a DataGrid in WPF?
I guess this as nothing do do specificaly with WPF. You can link almost any .net collection/data collector object to WPF data grid.
But your problem stands way before that and concerns .net data access in general. You should remove the WPF tag from your question and rather see what ADO. net can do for you.
Once this is done and that you have the content of your FoxPro db in a .net collection, then you will worry about WPF ;)
i don't think this is possible without driver installation. see this question.
There are ways to do it without installing new drivers but none if them are easy.
You could inspect the table at the file level - the structure is documented here: http://fox.wikis.com/wc.dll?Wiki~TableFileStructure
Or you could write a VFP exe that you can run from your C# code that dumps the table to XML. See the CURSORTOXML function for more details.
Written on my iPhone.
Do you know how to use basic ADO.Net to connect to a FoxPro DBF table and create a Typed DataSet? That's the first step you've got to get working. From there, the task becomes binding a WPF DataGrid to a Typed DataSet.