473,396 Members | 1,892 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,396 software developers and data experts.

.mdf DataBase in c# program

Hello all,
I have a db file .mdf in my program. I wander if it saves it everytime
values are inserted and if not how can it be done ? furthermore i want
to know where can i see the .mdf file after the program closes and
with what program.
cheers,
amir.

Mar 11 '07 #1
1 3977
Hello amir,
>I have a db file .mdf in my program. I wander if it saves it everytime
values are inserted and if not how can it be done ? furthermore i want
to know where can i see the .mdf file after the program closes and
with what program.
As you can see on Wikipedia (http://en.wikipedia.org/wiki/.mdf), the
extension .mdf can stand for a variety of things, but it seems a good
assumption that we're talking about a database file of Microsoft's SQL
Server here. If that is true, the answers to your question would be
something like this:
>I wander if it saves it everytime values are inserted and if not how can
it be done ?
Yes, it should save automatically every time values are inserted -
provided you do this correctly. For instance, you have to make sure you
actually push the values back from the Dataset you may be using, and that
any transactions are committed correctly and so on... I suggest you read
up on using ADO.NET if you find you're having problems in this area.
>furthermore i want to know where can i see the .mdf file after the program
closes and with what program.
Well, Explorer comes to mind - in a standard installation you might find
the files in a location like C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data.

Now, I expect this wasn't really the question you wanted to ask, as you're
also interested in the content of the file. To view that, you'll have to
use a tool that can talk to SQL Server (much like your own application
does), which will in turn access the file. Generally speaking there are
loads of tools out there that you could use, but there are some that
either come with SQL Server, or are freely available:

* For SQL Server 2005, you should be able to find the SQL Server Management Studio in your Start menu. I guess it's possible to install SQL Server without this tool, but in that case you should be able to install the tool from your original installation media.

* For SQL Server 2005 Express Edition, Microsoft makes the SQL Server Management Studio Express available for download here: http://www.microsoft.com/downloads/d...8-5A0F62BF7796

* For older versions of SQL Server, there were a number of tools - you should start looking at Enterprise Manager, which should be in your Start menu if you haven't chosen not to install it.

Hope this helps.
Oliver Sturm
--
http://www.sturmnet.org/blog
Mar 11 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rob Young | last post by:
This is the latest in the "Total Non-Programmer" series. Any feedback on the usability of this tutorial would be greatly appreciated. Thanks, Rob How to Build A Web Database (Without...
6
by: Marvin Libson | last post by:
Hi All: I am running DB2 UDB V7.2 with FP11. Platform is Windows 2000. I have created a java UDF and trigger. When I update my database I get the following error: SQL1224N A database...
1
by: Ruth | last post by:
Alison, You are going to find this a real coincidence! To begin with, I am Roberta Laird's husband. I think you know Roberta. We also are friends with Laura McConnell. Anyway, I am in business...
5
by: Bec | last post by:
I'm in desperate need of your help.. I need to build an access database and have NO idea how to do this.. Not even where to start.. It IS for school, and am not asking anyone to do my...
7
by: News | last post by:
Hello, I have to build a program with the future in mind and I need a bit of guidance from a guru or two. My program will start as a multi-user Windows Application built with VB.Net and using an...
7
by: ianenis.tiryaki | last post by:
well i got this assignment which i dont even have a clue what i am supposed to do. it is about reading me data from the file and load them into a parallel array here is the question: Step (1) ...
22
Frinavale
by: Frinavale | last post by:
How To Use A Database In Your Program Many .NET solutions are database driven and so many of us often wonder how to access the database. To help you understand the answer to this question I've...
15
by: chaseexchange | last post by:
First, a brief explanation of why this has happened. I purchased, what I thought, was a fully functional program written in Access last year from a local programmer. This program was to be used as...
8
by: situ | last post by:
Hello all, i have Database1 and database2, is it possible to make database connection to database2 by running stored procedure on database1. Thanks and Regards Situ
2
by: miroku800 | last post by:
A little history I designed a program in VB6 which used an access database with the aid of a then workmate (who has now moved on and lost interest) which was in two parts. A master program and a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.