Questions tagged [compact-database]
70 questions
20
votes
3 answers
How to change column width in DataGridView?
I have created a database and table using Visual Studio's SQL Server Compact 3.5 with a dataset as my datasource. On my WinForm I have a DataGridView with 3 columns. However, I have been unable to figure out how to get the columns to take up the…

Pallas
- 1,499
- 5
- 25
- 57
14
votes
5 answers
Compact or renumber IDs for all tables, and reset sequences to max(id)?
After running for a long time, I get more and more holes in the id field. Some tables' id are int32, and the id sequence is reaching its maximum value. Some of the Java sources are read-only, so I cannot simply change the id column type from int32…

Lenik
- 13,946
- 17
- 75
- 103
7
votes
4 answers
How to rename a table in the sql server compact edition
I'm new to SQL Server Compact edition. I'm using Compact edition 3.5. I tried renaming the table. But, I couldn't do that through the following query.
alter table tablename to newname
Plz, someone help me.........

Developer404
- 5,716
- 16
- 64
- 102
4
votes
2 answers
Programmatically create MS SQL Compact database file on a desktop
Is it possible to create an SDF database file for MS SQL Server Compact on a desktop.?
I want to craete a desktop application which can create an SDF database file for copying it to a Windows Mobile device.
Is it possible and how?
thanks

CITBL
- 1,587
- 3
- 21
- 36
3
votes
3 answers
Database Compacting and Archiving - MS Access Backend
Scenario: There is a legacy program (Not sure what language) and I have been asked to "Compact and Archive forms in the database". At the moment when the user opens the application it is taking about 2-5min to load around 27000 Records!!! My theory…

Gage
- 7,365
- 9
- 47
- 77
3
votes
2 answers
preventing Autoexec macro from running after Compact & Repair
Seems such a simple thing, but I can't find the answer anywhere.
Every time I Compact & Repair, my Autoexec macro runs again. Is there a way to prevent it from running here, as part of the reason for compacting is to get the file size back down…

Wilskt
- 337
- 2
- 9
- 24
2
votes
1 answer
Mongo DB Collection Compact
I have been looking at a way to reduce the size of a set of mongo databases that keep on growing in size. I am new to mongodb. I have looked at various methods for doing this and thought the following code might be the simplest way of achieving…

karen
- 893
- 2
- 13
- 38
2
votes
3 answers
Automatic Compact and Repair of MS Access Database
We have an MS Access based system that relies on back-end data stored in networked MS Access database. Sometimes those databases get corrupted when random networking issues occur. So we thought we should add some sort of process that can routinely…

mellamokb
- 56,094
- 12
- 110
- 136
2
votes
1 answer
Problem with distributed Computing with mdf files
I am using SQL EXPRESS EDITION 2005 and Created mdf data file using vb.net 2008. now i want to use this datafile in lan. i modified connection string
"Data Source=.\SQLEXPRESS;AttachDbFilename=\Server\Data\Data1.mdf;Integrated Security=True;User…

Rohan
- 157
- 1
- 15
2
votes
3 answers
Generating Integer Identity Primary Key for Entity Object in Entity Framework and SQL Server CE
I heard that this issue is fixed in SQL Server Compact Edition 4.0 CTP
As recently I just stepped into SQL Server CE and Entity Framework, and VS2010 not yet supporting SQL Server CE 4.0
I think I would need a work around for this issue
Can I know…

AlexvsCode
- 21
- 2
2
votes
1 answer
compact ms access database in vb.net without copy of the database
I have searched the net on this topic and found, that if an ms access database should be compacted, then I should give the database itself and a new path.
Why is this necessary? If I check in ms access, that it should compact the database after…

derstauner
- 1,478
- 2
- 23
- 44
2
votes
0 answers
What is a safe way to compact/optimize a MongoDB collection?
I wanted to compact some collections, and to my surprise this is not as straightforward as I thought. It failed after a couple of seconds and now I cannot connect to the database anymore:
Collection: MyDB.logs
---
Indexes : 7
Extents …

Redsandro
- 11,060
- 13
- 76
- 106
1
vote
2 answers
Compacting MDB File
Is there any way to compact the shared mdb file. I mean this file is is always in use. I am looking for the way to compact mdb file without disconnecting users (while the mdb file is in use)....
Access version is 2003.

THEn
- 1,920
- 3
- 28
- 35
1
vote
1 answer
Compact and Repair Database programmatically
How can I call Access's Compact and Repair Database utility from within C++? I'm already using ADO and ADOX, so a solution using either of those would be handy.

Smashery
- 57,848
- 30
- 97
- 128
1
vote
1 answer
Can you compact one Access database using a query in another database
I would like to compact DATABASE2 from a query within DATABASE1.
Situation: I have 2 Access databases, one with all the queries/logic, one with tables created from the first. Before I write from DATABASE1 into a table in DATABASE2 I use a query to…

Herb A
- 11
- 1