Community discussion forum

copying access DB to SQL DB

  • 1 year ago
    Good day! The code below doesn't work, It can't connect to the ODBC, so currently i'm migrating by means of datatable and it's a long code, Please if you know how to make it work please let me know. Thanks OleDbConnection AccessConnection = new OleDbConnection( @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Satour Tourism data.mdb"); AccessConnection.Open(); OleDbCommand cmd = new OleDbCommand(@" SELECT * INTO [datSATArrivals] IN '' [ODBC;Driver={SQL Server};Server=(LMBULUNGENI);Database=SAT;Trusted_Connection=yes] from Tourism_January_2008 ", AccessConnection); cmd.ExecuteNonQuery();
  • 1 year ago
    are you sure there is option to create such command (Select Into TABLE In CONNECTION) ? I am not quite familiar to such solution. Check out [JRO](http://social.msdn.microsoft.com/Search/en-US/?Refinement=112&query=jro+meta:Search.MSForums.GroupID(729d4ce2-2138-4ab2-a688-c1e5c0470cce)) class

Post a reply

Enter your message below

Sign in or Join us (it's free).

Want to stay in touch with what's going on? Follow us on twitter!