Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
			
		
		
			- 
				
																			
								_Dejan_							 
									
		- Posts: 23
 		- Joined: Mon  28 Dec 2009 07:30
 		
		
											- Location: Slovenia
 
							
						
		
		
						
						
													
							
						
									
						Post
					
								by _Dejan_ » Mon  22 Apr 2013 05:10
			
			
			
			
			Hi,
I have one problem. My application has this weekend stop working, because sdf file(SqlCE database) has reach 256MB size(Limit is 4GB). Exception which I get is:
Code: Select all
The database file is larger than the configured maximum database size. This setting takes effect on the first concurrent database connection only. [Required Max Database Size (in MB; 0 if unknown): 257, 0, 0,,,]
Im try add to the end of connection string:
 but then I get error that parametere is not ok:
Code: Select all
Parameter name is unknown - Max Database Size
How I can fix problem?
 
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			
								AndreyZ							 
									
						
		
						
						
		
		
						
						
													
							
						
									
						Post
					
								by AndreyZ » Mon  22 Apr 2013 07:15
			
			
			
			
			Hello,
You should set the TMSCompactConnection.Options.MaxDatabaseSize property to an appropriate value. For example:
Code: Select all
MSCompactConnection.Options.MaxDatabaseSize := 512;
If you want to set the maximum database size using the connection string, you should use the "ssce: max database size" connection parameter. For example:
Code: Select all
MSCompactConnection.ConnectString := 'ssce: max database size=512';
 
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			
								_Dejan_							 
									
		- Posts: 23
 		- Joined: Mon  28 Dec 2009 07:30
 		
		
											- Location: Slovenia
 
							
						
		
		
						
						
													
							
						
									
						Post
					
								by _Dejan_ » Mon  22 Apr 2013 11:10
			
			
			
			
			thanks for your reply but I don't have TMSCompactConnection component. Instead of that I use TMSConnection which do not accept "max database size=512" in connection string..
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			
								AndreyZ							 
									
						
		
						
						
		
		
						
						
													
							
						
									
						Post
					
								by AndreyZ » Mon  22 Apr 2013 12:20
			
			
			
			
			The TMSConnection component cannot be used to modify the maximum database size of the SQL Server Compact database. For such operation, only the TMSCompactConnection component can be used. TMSCompactConnection is intended for working with SQL Server Compact Edition.
If you do not have TMSCompactConnection, it means that you are using SDAC Standard Edition. TMSCompactConnection is included in SDAC Professional Edition. For more information about SDAC Editions, please refer to 
http://www.devart.com/sdac/editions.html
To avoid the problem, you should upgrade SDAC to Professional Edition. You can upgrade SDAC here (the Edition Upgrades section): 
http://www.devart.com/sdac/ordering.html#subscriptions 
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			
								_Dejan_							 
									
		- Posts: 23
 		- Joined: Mon  28 Dec 2009 07:30
 		
		
											- Location: Slovenia
 
							
						
		
		
						
						
													
							
						
									
						Post
					
								by _Dejan_ » Tue  23 Apr 2013 05:28
			
			
			
			
			Thanks for your reply. Im find later that TMSCompactConnection is included in Pro package. I will upgrade to pro and use it... Because this component is optimized for SqlCE are there included options which Im ask for in suggestion forum?
Thanks for your reply.
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			
								AndreyZ							 
									
						
		
						
						
		
		
						
						
													
							
						
									
						Post
					
								by AndreyZ » Tue  23 Apr 2013 07:15
			
			
			
			
			For the time being SDAC does not have the functionality that allows to perform operations you asked for. Now, we have tasks of higher priority, so we cannot provide any time-frame of when this functionality will be implemented in SDAC.
The more users vote for your suggestion, the more priority it gains. Suggestions with many votes will be implemented faster.
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			
								_Dejan_							 
									
		- Posts: 23
 		- Joined: Mon  28 Dec 2009 07:30
 		
		
											- Location: Slovenia
 
							
						
		
		
						
						
													
							
						
									
						Post
					
								by _Dejan_ » Fri  03 May 2013 06:03
			
			
			
			
			Im upgrade to Pro version...
My connection string is:
Code: Select all
SQLCEConnection.ConnectString:='Provider=MICROSOFT.SQLSERVER.MOBILE.OLEDB.3.5;Password=' + pass + ';Data Source="' + path + '";ssce: max database size=4090';
but when I try open database I still get error:
Code: Select all
First chance exception at $7588C41F. Exception class Exception with message 'Invalid character ':' in non-quoted connection parameter value'.
Code:
Code: Select all
procedure TDataModule1.CheckDatabase();
var SQLCEConnection :TMSCompactConnection;
begin
 try
  CoInitialize(nil);
  SQLCEConnection:=TMSCompactConnection.Create(nil);
  SQLCEConnection.ConnectString:='Provider=MICROSOFT.SQLSERVER.MOBILE.OLEDB.3.5;Password=' + pass + ';Data Source="' + path + '";ssce: max database size=4090';
  try
   SQLCEConnection.Open;
   ... Do something ...
  except
   ... Do something ...
  end;
 finally
  SQLCEConnection.Close;
  SQLCEConnection.Free;
  CoUninitialize;
 end;
end;
What Im doing wrong?
 
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			
								AndreyZ							 
									
						
		
						
						
		
		
						
						
													
							
						
									
						Post
					
								by AndreyZ » Wed  08 May 2013 13:33
			
			
			
			
			Such error means that you are using the TMSConnection component instead of TMSCompactConnection. To solve the problem, you should use TMSCompactConnection (make sure that SQLCEConnection is of class TMSCompactConnection).
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			
								_Dejan_							 
									
		- Posts: 23
 		- Joined: Mon  28 Dec 2009 07:30
 		
		
											- Location: Slovenia
 
							
						
		
		
						
						
													
							
						
									
						Post
					
								by _Dejan_ » Wed  08 May 2013 14:00
			
			
			
			
			AndreyZ wrote:Such error means that you are using the TMSConnection component instead of TMSCompactConnection. To solve the problem, you should use TMSCompactConnection (make sure that SQLCEConnection is of class TMSCompactConnection).
I must say that you are wrong. Please check Code in my previous post. I don't use TMSCompactConnection in design time I create it in runtime so Im sure that I use Compact version of connection...
For example for now I use next code:
Code: Select all
procedure TDataModule1.CheckDatabase();
var SQLCEConnection :TMSCompactConnection;
begin
try
  CoInitialize(nil);
  SQLCEConnection:=TMSCompactConnection.Create(nil);
  SQLCEConnection.ConnectString:='Provider=MICROSOFT.SQLSERVER.MOBILE.OLEDB.3.5;Password=' + pass + ';Data Source="' + path + '"';
  SQLCEConnection.Options.MaxDatabaseSize:=4090;
  try
   SQLCEConnection.Open;
   ... Do something ...
  except
   ... Do something ...
  end;
finally
  SQLCEConnection.Close;
  SQLCEConnection.Free;
  CoUninitialize;
end;
end;
But if I try add 'ssce: max database size=4090' to ConnectString it fail... We are talking about creating connection string in code and not designer... If I remember right if Im try put TMSCompactConnection to form and create ConnectString on component with setting Options -> MaxDatabaseSize to 4090 (It add 'ssce: max database size=4090' to ConnectString) and I think it work but if I try setup SAME connection string in code like on example(without visual TMSCompactConnection component) it fail...
 
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			
								AndreyZ							 
									
						
		
						
						
		
		
						
						
													
							
						
									
						Post
					
								by AndreyZ » Fri  10 May 2013 14:55
			
			
			
			
			Please make sure you are using the latest SDAC version 6.7.13. You can learn the exact SDAC version you are using via the Delphi Main Menu->SDAC->About SDAC menu.
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			
								_Dejan_							 
									
		- Posts: 23
 		- Joined: Mon  28 Dec 2009 07:30
 		
		
											- Location: Slovenia
 
							
						
		
		
						
						
													
							
						
									
						Post
					
								by _Dejan_ » Thu  16 May 2013 06:37
			
			
			
			
			AndreyZ wrote:Please make sure you are using the latest SDAC version 6.7.13. You can learn the exact SDAC version you are using via the Delphi Main Menu->SDAC->About SDAC menu.
Im shure that I using latest version.

 
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			
								AndreyZ							 
									
						
		
						
						
		
		
						
						
													
							
						
									
						Post
					
								by AndreyZ » Thu  16 May 2013 11:38
			
			
			
			
			It seems that there are still files from the old SDAC version on your computer. Please try the following:
- remove SDAC;
- remove all *dac*.bpl and *crcontrols*.bpl files from your computer;
- remove *.dcu files from your project;
- reinstall SDAC.
If it doesn't help, try the following:
- remove SDAC;
- reinstall SDAC with the /force parameter like this: sdac67d14pro.exe /force