Migrating from Access to SSCE - sql-server

I have an application with databases in MS Access. I want to migrate that to SSCE.
I have converted all the databases. Problem is with datasets.
Do I need to make all new datasets or there is a way to convert the existing ones to SSCE datasets?
Thanks

They should remain unchanged except for the connection string to the database (datasets are based on ADO.NET which talks both Jet SQL and TSQL.
For instance if your datasets use table adapters for their data you can change the connection strings in the table adaptor properties using Visual Studio's dataset editor (just double click the xsd file, right click on the desired table adapter and choose properties; in the property pane you can set the connection appropriately).

Related

How can I update existing SQL datasources (Live) to connect to correct views (reconnect) in Tableau Deskop?

I have one question. I am new in Tableau and I have to update existing SQL datasources (Live datasources) to connect to correct views (reconnect) in Tableau Deskop, because of some mappings/new data that were added to SQL database.
For the same reasons, I have to also create new Tableau datasources.
How do I do that, update existing SQL datasources and create new datasources? Also, for creating new datasources is it possible to do it from Tableau Server or just from Tableau Desktop?
Thanks.
I believe Tableau only allows you to create data sources in the desktop environment.
If your SQL source is using a SQL statement you can alter your query to bring in the new data and then refresh the extract.
It's worth noting that the desktop extract is no longer used once you've published your workbook to the server (until you need to make more changes in the desktop environment).
I find making changes on Tableau server limited, so it's almost always best to make significant changes on desktop.
Also, if you're changing to new data sources, once you've loaded the data into Tableau, in the Sheet view you should be able to right click on one source and choose to point your views to the new source.
It all depends on the desired result.

Automatic mapping of OleDbType to Sql server data Type and .Net Type

I open a Foxpro file using OleDb
Dim connection As New OleDbConnection(String.Format("Provider=VFPOLEDB.1;Data Source={0};", dbfPath))
connection.Open()
Dim tables As DataTable = connection.GetSchema(System.Data.OleDb.OleDbMetaDataCollectionNames.Tables)
Then I analyze the structure of the FoxPro data
For Each rowTables As System.Data.DataRow In tables.Rows
Dim columns As DataTable = connection.GetSchema(System.Data.OleDb.OleDbMetaDataCollectionNames.Columns, New [String]() {Nothing, Nothing, rowTables("table_name").ToString(), Nothing})
For Each rowColumns As System.Data.DataRow In columns.Rows
Console.Out.WriteLine(String.Format("{0};{1};{2};{3};{4};{5}", rowTables("table_name").ToString(), rowColumns("column_name").ToString(), rowColumns("data_type").ToString(), rowColumns("CHARACTER_MAXIMUM_LENGTH").ToString(), rowColumns("NUMERIC_PRECISION").ToString(), rowColumns("NUMERIC_SCALE").ToString()))
Next
Next
Now I must create a Sql server table with a compatible structure in order to load the FoxPro data (I'll use a DataReader and SqlBulkCopy).
I could use the information collected inside the For Each to build an SQL script to create the table but I would like to know if there is a smarter way to automatically map data types of FoxPro on Sql server, avoiding a Select Case that implements this table https://msdn.microsoft.com/en-us/library/ms130984.aspx
By project requirement I cannot use Entity framework (and i think it is not the right tool to load millions of records).
If you have VFP, and this will be a one time upgrade process, have you looked into VFP from the menu Tools -> Wizards -> Upsizing?
This will allow you to define a connection to SQL Server, then pick your database you want to upsize to. Pick the tables and go.
If your tables are "free" tables (not associated with an actual database container), I think you can still upsize them, but it has been a while since I dug into that process, but can offer additional direction if this is an avenue you have available to run with.

How to get SharePoint to “see” new SQL Views, Tables and Stored Procedures in SQL Server?

I’m trying to define new external content types, I’m able to connect to SQL Server and define external content types from tables, stored procedures and views that were already in the database.
The problem I’m having is that I created a new SQL View in SQL Server with the data I want, but when I try to define a new content type, SharePoint doesn’t show me the new SQL View in Data Source Explorer.
I thought it could possibly be the way the SQL view was created, so I created a new test Table, a new stored procedure but that didn’t work either.
I tried “Refresh All” and deleting and re-creating the connection in Data Source Explorer, but nothing seems to work.
It seems that any views, tables or stored procedures that I created after a certain point in time are not available in SharePoint
I’m using SharePoint 2010 and SQL Server Express Edition with Advanced Services (64bit)
Any help is greatly appreciated.
Thanks in advance,
Silvio

SP that generates a SQL table from the clipboard

Retrieving data from Excel to a SQL server database is common.
Let's say I have selected 4 columns of data from Excel and I copyed this data to my Clipboard.
Q: How can I generate a table (temporary or normal) with 4 columns (could be all characters) ?
This kind of thinking is fundamentally flawed. Excel is a client application where the user interface is the application, whereas SQL Server is a server type application, where SQL management studio is provided as a facilitator, not inherent in the application itself.
It is concievably plausible that you could use a CLR stored procedure to access the clipboard but I would advise against it.

How to generate typed datasets for multiple database platforms?

I want to generate a typed DataSet for both Oracle and DB2 databases from a single XSD file.
Background:
When I drag a table onto the Visual Studio Dataset Designer, it generates a XSD file (e.g. DataSet1.xsd) with all appropriate information. Then VS invokes the built-in Tool (MSDataSetGenerator) to generate the Dataset classes into the CS file.
Somehow (I don't know how) CS determines the Data provider and generates Dataset classes that refer to the data provider (OracleDataProvider or IBM.Data.Provider).
Question:
Does anybody know how I can customize VS to compile both for DB2 and Oracle code generation ?
Best regards
Oliver
Hi the problem is not in the structure of the data (set,tables).
It's the automatically generated adapters that create a dependency on the database/connection.
The first way to circumvent this (a bit) is using ODBC connections for your adapters.
Then the connectionstring determines which database you use..
However.. the SQL syntax is always a little different.
Personally I just make a DataSet.xsd with only datatables (new datatable instead of new dataadapter).
Then I write my own repositories/adapters myself. So one for oracle and one for DB2.
These repositories/adapters fill the datatables..
So you can share the model between databases but you implement database specific adapters.

Resources