473,382 Members | 1,717 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Changing the database before every test (any other way to do it ?)

Hi, I am writing some profiling tests for certain methods like adding customers (different batch sizes 100, 1000, 10000) to customers table in the database. I am using SqlCE database because of its support from LINQ.

Now to reach the ideal case, i am changing the database before every test so that every test will have same database. for that i am using File.Copy() but while using db.customers.FirstOrDefault() in the second test, i am getting the error "The database file may be corrupted. Run the repair utility to check the database file."

I am clearing the data context after the test. The problem also may be with linq. I am not sure.Any idea of solving this. or any alternative to this approach. Any suggestions are required.
Feb 4 '11 #1
0 1027

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Steven Buroff | last post by:
Is there any way to get MySQL to create the directory for a new database in a specified directory instead of its "data" directory?
4
by: Bruce | last post by:
I need to create a stored procedure in the master database that can access info to dynamically create a view in another database. It doesn't seem like it should be very hard, but I can't get it to...
0
by: Robert OShea | last post by:
Currently we are running a system on old HP box running Turbo Image, this is being phase out and there is some debate over when the Databse should be redesign to run SQL server. We are writing a 3...
3
by: deko | last post by:
I'm using Access 2003 on WinXP-SP2. I open mydb.mdb from Windows Explorer, or from a shortcut that points to the mdb. The problem is every time I open mydb.mdb, a duplicate is created -...
6
by: priya0123 | last post by:
Hi, I have created a test database on the production server. But I want to point that test database to the test server. I am using SQL Server 2000. Any help would be really appreciated. Thanks
8
uranuskid
by: uranuskid | last post by:
Hey folks, I'm curious about how to perform following task: I need to update a MySQL database every day in terms of deleting expired entries.Therefore, I have to fields in the db named 'date'...
0
by: pratush | last post by:
hi friends, Can anyone tell me what is wrong with this in IBM DB2 7.2. I am getting a problem while creating a local database through stored procedure . i am add it manually and giving the TCP\ip...
0
by: isaikrishchaitu | last post by:
Hi,to all i am having a problem. i am doing a project where i need to create two frames(columns), left should contain all url's which comes from database,when i click start button the timer should...
0
by: michael ngong | last post by:
pramod@rtimes.com (Pramod Ramachandran) wrote in message news:<6616e304.0306240122.4dd3ecd5@posting.google.com>... Permit me start with the second question. It would be easier to be more...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.