tag:blogger.com,1999:blog-5238131531249720750.post1289234303246095006..comments2024-03-19T13:28:26.291+01:00Comments on Everything SQL Server Compact: Import SQL Compact data to ExcelErikEJhttp://www.blogger.com/profile/12641272161018114573noreply@blogger.comBlogger22125tag:blogger.com,1999:blog-5238131531249720750.post-32043569081478774072017-05-12T03:37:16.449+02:002017-05-12T03:37:16.449+02:00Thanks you! Very much!
Error 3706 - yo need to ha...Thanks you! Very much! <br />Error 3706 - yo need to have Microsoft sql server compact and verify the compatibility with the version on the code (may be update the code with the correct version that you have on machine).<br />Now I'm looking for any way to update the file with excel.<br /> Anonymoushttps://www.blogger.com/profile/16749435498024245631noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-4801246187847280742016-08-16T15:08:47.016+02:002016-08-16T15:08:47.016+02:00@gary: No, I do not, but it would be very similar,...@gary: No, I do not, but it would be very similar, yesErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-34996184408320476352016-08-16T14:47:13.339+02:002016-08-16T14:47:13.339+02:00Hi,
Do you know of any code to pull data from a...Hi,<br /> Do you know of any code to pull data from an SQL CE file into Access? I'm assuming it would be similar to your excel codeAnonymoushttps://www.blogger.com/profile/15536564544644704296noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-3803119690016898602015-03-23T17:37:20.261+01:002015-03-23T17:37:20.261+01:00Hi,
Great code. I added the following so It would...Hi,<br /><br />Great code. I added the following so It would re-size data automatically <br /><br /> Worksheets(ws.Name).Columns("A:Z").AutoFit<br /><br /><br />Between <br /><br /> <b>Wend</b><br /> Worksheets(ws.Name).Columns("A:Z").AutoFit<br /><b> pRS.MoveNext</b>Anonymoushttps://www.blogger.com/profile/01268370645523904116noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-4312341456910035262014-04-04T21:32:11.509+02:002014-04-04T21:32:11.509+02:00Colin: this is not a good forum for tech support, ...Colin: this is not a good forum for tech support, suggest you ask on the MSDN forumErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-50085995648814822362014-04-04T16:26:13.552+02:002014-04-04T16:26:13.552+02:00Thanks Erik. Would Access be any easier? If not,...Thanks Erik. Would Access be any easier? If not, my application that uses the sdf file can import csv files so I would look at doing the edits in Excel, and saving the individual tables as csv files and importing those.Anonymoushttps://www.blogger.com/profile/14935005923729529945noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-24467886272425386322014-04-04T14:02:40.968+02:002014-04-04T14:02:40.968+02:00This comment has been removed by the author.ErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-11362870476082330012014-04-04T14:02:40.061+02:002014-04-04T14:02:40.061+02:00Colin: Yes, but it would be quite hard from Excel....Colin: Yes, but it would be quite hard from Excel... But it is possible to create a new sdf file from VBA, and then of course you can do CREATE TABLE and INSERTs as needed, but it would require quite a lot of code.ErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-47894034870286587022014-04-04T13:45:02.670+02:002014-04-04T13:45:02.670+02:00Hi Erik,
Is it possible to go the other way, eg. ...Hi Erik,<br /><br />Is it possible to go the other way, eg. Save As .sdf or equivalent code?<br /><br />I would like my users to download sdf into Excel (your code here works great), have them modify it and save back into the same or a different .sdf database.<br /><br />Cheers ColAnonymoushttps://www.blogger.com/profile/14935005923729529945noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-78222781497076697822012-02-06T17:55:20.988+01:002012-02-06T17:55:20.988+01:00Guypb: Do you have the x64 SQL Compact runtime ins...Guypb: Do you have the x64 SQL Compact runtime installed?ErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-28233415462670947682012-02-06T16:55:28.070+01:002012-02-06T16:55:28.070+01:00Hi Erik, any idea what I need to do to get this to...Hi Erik, any idea what I need to do to get this to work with 64-bit Excel? It's worked fine with 32-bit!guypbhttps://www.blogger.com/profile/13631418894621597445noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-90641115585883851152011-11-04T09:02:28.469+01:002011-11-04T09:02:28.469+01:00Steve: And you have the required software and refe...Steve: And you have the required software and references in place? If yes, please send me a repro.ErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-26204209263854551292011-11-04T00:44:26.366+01:002011-11-04T00:44:26.366+01:00Erik, when i run the code I get a Run Time Error &...Erik, when i run the code I get a Run Time Error '3706' Application-defined or object-defined error.stevehttps://www.blogger.com/profile/10930147667034129537noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-57395114849090580692011-07-07T20:09:27.800+02:002011-07-07T20:09:27.800+02:00Eric, Since the code that you posted works well wi...Eric, Since the code that you posted works well with my project, I thought that I'd see if it could be done with sql .mdf, I realize now that the file is locked when in use so the "code road" doesn't appear to be an option for me afterall. I took your advice and set up a local ODBC connection using the SQL Native Client and that appears to do the trick for Excel and Access. I haven't yet been able to get a remote (LAN or WAN) connection to the database to work, and after searching for the error from the server log, it appears that it's an issue that others are having when on Win7 64bit machines. Anyhow, thanks again for your help. <br />-NateNate Cooverthttps://www.blogger.com/profile/12533672136764624677noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-58500790980376102922011-06-30T10:58:54.317+02:002011-06-30T10:58:54.317+02:00Nate: There are built-in Data tools in Excel + Pow...Nate: There are built-in Data tools in Excel + PowerPivot that can pull data easily from SQL Server, why go down the code road?ErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-18215000975015209752011-06-29T21:47:42.244+02:002011-06-29T21:47:42.244+02:00Erik, thanks for this, it worked great. I was won...Erik, thanks for this, it worked great. I was wondering if this can be used to connect to a .mdf file made from sql server 2008. If so, what reference and connection strings would need to be changed? Thank you.Nate Cooverthttps://www.blogger.com/profile/12533672136764624677noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-19094143277989334242010-08-31T17:49:45.440+02:002010-08-31T17:49:45.440+02:00Information on creating a database in VBA here: ht...Information on creating a database in VBA here: http://social.msdn.microsoft.com/Forums/en-US/exceldev/thread/2e104cc5-1ae5-4d52-b8fe-482a84c48a76ErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-13624620261144809042010-03-16T19:38:48.223+01:002010-03-16T19:38:48.223+01:00Could you share your code? - Suggest you post it o...Could you share your code? - Suggest you post it on the MSDN forum to the benefit of all: http://social.msdn.microsoft.com/Forums/en-US/sqlce/threads (or e-mail me, see contact info)ErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-17606266169097007382010-03-16T19:34:05.072+01:002010-03-16T19:34:05.072+01:00Hey Erik... I know this post has been here a while...Hey Erik... I know this post has been here a while. It is close to what I am trying to do EXCEPT I'm hoping to connect an SQL CE file (main.dat) to an Access DB so I can run some vba code (extract id3 tag data from an mp3 file and update a field in the CE). Getting: Method 'Open' of object '_Connection' failed at the pconn.open line. Any help is much appreciated.Unknownhttps://www.blogger.com/profile/05831459085094369900noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-28116571944408558242008-06-11T21:29:00.000+02:002008-06-11T21:29:00.000+02:00Simon, have a look here:http://erikej.blogspot.com...Simon, have a look here:<BR/>http://erikej.blogspot.com/2008/06/inserting-images-from-vba.htmlErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-29181933810898009682008-06-06T14:40:00.000+02:002008-06-06T14:40:00.000+02:00I will look into it... I don't have code for BLOB ...I will look into it... I don't have code for BLOB inserts just now.ErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-10938475222746245582008-06-05T01:37:00.000+02:002008-06-05T01:37:00.000+02:00Erik,Do you happen to have any code to make things...Erik,<BR/><BR/>Do you happen to have any code to make things go the other way? Specifically not using .Net? I am currently trying to export data from Microsoft Access 2003 to a SQL Compact database. I have got the basic insert working, but have been unable to insert images? I keep on getting the error "Not enough storage to complete this operation". Any ideas how this might be accomplished?<BR/><BR/>Thanks SimonSimonhttps://www.blogger.com/profile/17481029897067487778noreply@blogger.com