tag:blogger.com,1999:blog-5238131531249720750.post1922894151686479096..comments2024-03-19T13:28:26.291+01:00Comments on Everything SQL Server Compact: Access SQL Server Compact 4 with ASP Classic and VbScriptErikEJhttp://www.blogger.com/profile/12641272161018114573noreply@blogger.comBlogger24125tag:blogger.com,1999:blog-5238131531249720750.post-71581680332423693522017-04-21T16:48:55.122+02:002017-04-21T16:48:55.122+02:00James, I think you have too high expectations for ...James, I think you have too high expectations for the functionality available. Stick to text based sql statements, no sql injection possible with sqlce anywayErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-13488414476663729222017-04-21T16:23:23.522+02:002017-04-21T16:23:23.522+02:00I'm using ADOBD.Commands with parameters. I tr...I'm using ADOBD.Commands with parameters. I tried the other method and it's not supported.Anonymoushttps://www.blogger.com/profile/06147943175889981320noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-72462684963406925272017-04-21T10:09:42.373+02:002017-04-21T10:09:42.373+02:00@James: In my sample code, I see no reference to t...@James: In my sample code, I see no reference to the "ActiveConnection" property, so why would you expect that to work?ErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-65106867028920778702017-04-21T07:04:25.208+02:002017-04-21T07:04:25.208+02:00I cannot make a connection. I get error '80004...I cannot make a connection. I get error '80004005' when I run this line of code:<br />rs_cmd.ActiveConnection = MM_datasource_STRING. <br /><br />My connection string is: <br />MM_datasource_STRING = "Provider=Microsoft.SQLSERVER.CE.OLEDB.4.0;Data Source=" & Server.MapPath("../database/datasite_eight.sdf").<br /><br />I've tried everything I can think of and no luck. The ActiveConnection method fails.Anonymoushttps://www.blogger.com/profile/06147943175889981320noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-16248168294308764052017-03-13T09:10:41.467+01:002017-03-13T09:10:41.467+01:00@Martin: File location? OS update?@Martin: File location? OS update?ErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-83568181651243825522017-03-13T08:44:49.970+01:002017-03-13T08:44:49.970+01:00Sorry for bumping an old post.
First, I want to sa...Sorry for bumping an old post.<br />First, I want to say thanks! Great post.<br />Second, is there anyone who ran in to the same problem as me.<br />There seem to be an issue with the 4.0 SP1 version.<br />I cant get the script working unless running it as administrator.<br />Same goes if I use oledb from a program. Need to right click run as administrator.<br />Worked fine before SP1..Martinhttps://www.blogger.com/profile/06386893987679249193noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-50922196017900036722013-10-09T19:20:56.973+02:002013-10-09T19:20:56.973+02:00Matthew: Installing the 4.0 MSI should create the ...Matthew: Installing the 4.0 MSI should create the HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{2006C53A-C915-41EA-BAA9-9EAB3A1FBF97} and HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Microsoft.SQLSERVER.CE.OLEDB.4.0registry keys etc, which are requiredErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-24856996808297587882013-10-09T17:24:12.109+02:002013-10-09T17:24:12.109+02:00In your post you state "SQL Server Compact 4....In your post you state "SQL Server Compact 4.0 OLEDB provider must be installed on the system". I have installed the standard 4.0 and the 4.0 SP1 main installation (I am an administrator) - but I still get an error. I am unable to locate a separate installation for the OLEDB driver.Anonymoushttps://www.blogger.com/profile/04040889516801795839noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-62418278623852934032013-08-23T09:55:22.611+02:002013-08-23T09:55:22.611+02:00arul: Suggest you add error handlingarul: Suggest you add error handlingErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-8390500481374615422013-08-23T09:39:33.695+02:002013-08-23T09:39:33.695+02:00An error occurred on the server when processing th...An error occurred on the server when processing the URL. Please contact the system administrator.<br /><br />If you are the system administrator please click here to find out more about this error.<br /><br />my sample code<br /><br /><br /><br /><br />set conn = Server.CreateObject("ADODB.Connection")<br /><br />strCnxn = "Provider=Microsoft.SQLSERVER.CE.OLEDB.4.0;" & _<br /> "Data Source=C:\inetpub\wwwroot\Training\App_Data\DBContext.sdf"<br /><br />conn.Open strCnxn<br /><br />set rs = Server.CreateObject("ADODB.recordset")<br />rs.Open "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES", conn<br /><br />do until rs.EOF<br /> for each x in rs.Fields<br /> Response.Write(x.name)<br /> Response.Write(" = ")<br /> Response.Write(x.value & "")<br /> next<br /> Response.Write("")<br /> rs.MoveNext<br />loop<br />'<br />rs.close<br />conn.close<br /><br /><br /><br /><br />sql server compact is install my systemsarulhttps://www.blogger.com/profile/00735246722105930547noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-79952546785721681582013-06-12T10:59:02.300+02:002013-06-12T10:59:02.300+02:00THANKS A LOT ...IT WORKS LIKE MAGIC!!! :D
THANKS A LOT ...IT WORKS LIKE MAGIC!!! :D<br />jarimhttps://www.blogger.com/profile/15639410733262220950noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-64749345964248828862011-07-15T20:12:35.906+02:002011-07-15T20:12:35.906+02:00Thanks Erik! I'll be following you!Thanks Erik! I'll be following you!Marco Plazahttps://www.blogger.com/profile/01373035416910754355noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-53159622556650796202011-07-15T11:40:16.601+02:002011-07-15T11:40:16.601+02:00Marco: Look here http://msdn.microsoft.com/en-us/l...Marco: Look here http://msdn.microsoft.com/en-us/library/system.data.sqlserverce.sqlceconnection.connectionstring.aspx (use the ones with ssce: in front)ErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-66897190850152145272011-07-14T23:36:02.654+02:002011-07-14T23:36:02.654+02:00Hi, excellent blog. Could you please post the comp...Hi, excellent blog. Could you please post the complete connection string for password protected database and other useful parameters?, I've been looking everywhere and can't find it.<br /><br />Thanks!!Marco Plazahttps://www.blogger.com/profile/01373035416910754355noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-54384231272087863992011-03-29T15:28:51.317+02:002011-03-29T15:28:51.317+02:00Info: Please post a repro, best on the MSDN forum ...Info: Please post a repro, best on the MSDN forum or Stackoverflow, thanks.ErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-38204502844503282612011-03-29T15:24:01.859+02:002011-03-29T15:24:01.859+02:00Using Excel 2003 Macro getting
'Runtime Error...Using Excel 2003 Macro getting <br />'Runtime Error -2147467259 (80004005)'Unknownhttps://www.blogger.com/profile/08740344535410628702noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-84107311631123488232011-03-06T09:41:08.919+01:002011-03-06T09:41:08.919+01:00Hans: ASP.NET 3.5 -Yes, see other posts in my blog...Hans: ASP.NET 3.5 -Yes, see other posts in my blog. Linked to Access - no.ErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-28213776428676956122011-03-06T00:03:30.573+01:002011-03-06T00:03:30.573+01:00Your site is very helpfull. I managed to connect t...Your site is very helpfull. I managed to connect to a Compact 4.0 Database using this connectionstring. But is it also possivle to make a connection from an ASP.NET 3.5 website?<br /><br />And is it possible to link the tables to an Access database?Hanshttps://www.blogger.com/profile/06035436363010661877noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-66590975823400226612011-03-02T08:36:14.578+01:002011-03-02T08:36:14.578+01:00Yes: http://msdn.microsoft.com/en-us/library/ff929...Yes: http://msdn.microsoft.com/en-us/library/ff929071(v=sql.110).aspxErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-4544729399110175892011-03-02T00:39:06.946+01:002011-03-02T00:39:06.946+01:00...like a 'contained database' perhaps (th......like a 'contained database' perhaps (that can be extended)?!Rod Machttps://www.blogger.com/profile/12703761122579581492noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-78389163885772925162011-03-01T11:11:21.205+01:002011-03-01T11:11:21.205+01:00MS is woking on making a SQL Server database very ...MS is woking on making a SQL Server database very portable/independent/movable in the next release (Denali)ErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-15769633726731920462011-02-28T22:09:27.515+01:002011-02-28T22:09:27.515+01:00I was thinking in the context that one had two SQL...I was thinking in the context that one had two SQL Server files which equated to a SQL Server database (ignoring the log file) and the 'data only' file and not the 'code only' SQL Server file was synonymous with a SQL Compact file. When I want to migrate to SQL Server, all I do is create a new SQL Server code file (i.e. with SP's) and copy over my SQL Compact (data) file to become the other half of my SQL Server database i.e. we're talking purely SQL/DB and nothing to do with EF. It gets round the fundamental problem that a SQL Server database file is not just data which poses a current problem of portability. It seems a little crazy that upscaling from Compact to SQL Server requires special sync tools when it could be part of the same thing!Rod Machttps://www.blogger.com/profile/12703761122579581492noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-39298737213528603932011-02-28T21:29:42.718+01:002011-02-28T21:29:42.718+01:00Thanks Rod. I think that Entity Framework + SQL Se...Thanks Rod. I think that Entity Framework + SQL Server Compact solves exactly that problem without involving SQL Server.ErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-25438512606941113532011-02-28T00:49:43.224+01:002011-02-28T00:49:43.224+01:00Excellent article and Compact's reach just gro...Excellent article and Compact's reach just grows. I was thinking back to my Access days and how we always wrote two Access DB's as part of a system - one for the UI/front end with all the VBA code then one solely to hold data. If SQL Compact solely held data as one file and a SQL Server database file held SP's etc (the code side), that would give portability to the data. I was thinking that would be a great way to make the task of backing up from shared servers easy, particularly as the SQL DPW now runs from Management Studio only i.e. it's not a standalone anymore and is too complex for non DBA's/programmers. In the UK at least where we have a shared platform with ISP's like Fasthosts, backing up SQL has become unmanageable. Could a data only version of SQL Compact in conjunction with a SQL Server (service) resolve this?Rod Machttps://www.blogger.com/profile/12703761122579581492noreply@blogger.com