.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

how to periodically update database file of my wpf application?

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :WPF
Hi, I have a WPF Windows application which we distribute to our clients. The application consists of some database table which changes every month. eg. the application users a  exchange rate table which is valid for one month. What is the best approach to update the data in these table. Please note that the whole application is not changing but only the data in it changing. Please guide me with some options how I can achieve this task. Thank You. Mohamed Ziyad

View Complete Post

More Related Resource Links

An example of packaging web application containing database upgrade SQL file

A few months ago, we have a blog talking about extending the web publishing pipeline to package database project deployed SQL file.  In this blog, I'll show step by step example of packaging web application with SQL Server database upgrade SQL file using Visual Studio 2010.  This way, we can generate a web package with incremental SQL script to certain database version.  The scenario may help distributions of a web upgrade package which needs to be installed on many different locations, each with their own SQL server database.   1. Create a Web Application Project 2. Add a new "SQL Server 2008 Database Project" to the solution 3. Prepare a development database, such as my test1 database as the following: 4. Right click our...(read more)

Update Profile Database from text file using BDC



I have a requirement to import the profile properties from a text file in sFTP to update the MOSS Profile Database. The objective is to create a single repository for the Staff Directory in MOSS.

Can I use BDC to connect and update the Profile database?

What is the alternate approach?


Sdf file doesn't update once the application close

     i have configured for data sync setup using configure data synchronization wizard, then deploy the application in emulator. while run the application the data has synched back and forth from client to server on two way sync.  once application get closed the sdf.file is only having  existing data which is same as we got end point of configuration. we can view the updated data while run the application. but we restart application we didn't have the updated and newly inserted data . i don't know what i missed in config. it would be great help if anyone guide me.

Restore database from system dbs and log file when .mdf file size set to 0KB after Windows Update ?


This can't be right. Friday I tried to install some Windows updates including ‘Security Update for …Windows Server 2008 for x64-based Systems (KB2416473)’ on both my host Server 2008 box and on a VM instance of Server 2008 running on the same physical box. An important SQL Server 2008 instance lives on that VM.


The above mentioned update failed on both the host and the VM, but a system shutdown and reboot were required for both OS’s anyway. When SQL Server started up again on the VM, the *.MDF file size for 2 (out of maybe 15 total) databases had been reduced to 0KB. Additionally, 1 of accompanying *.LDF files was now also 0KB in size, while the other *.LDF file was probably its normal size of 2.9GB. All the other databases and log files, including Master.mdf, seem to be okay.


I’m new to SQL Server and have a couple of questions of cours

Does this look correct for saving a file/ new record to a database


So thank you for all your help so far, So I think i got this right,
but would like for you all to look it over to see if there is any
areas I might run into trouble with:

//using asp.net mvc 2
the table (sql server 2005, using entities framework)
table fields
"Pattern_Media_GUID  uniqueid 
"Pattern_GUID  uniqueid
"Media varbinary(max)  
"height int
"Width int
"Media_Type String (50)

the form:
<h2> Add Media to this pattern</h2>
<% Html.EnableClientValidation(); %>
<% Html.BeginForm("AddMedia", "Pattern", new { id= Model.Pattern_Guid} , FormMethod.Post, new {enctype = "multipart/form-data"}); %>
    <%: Html.Label("height") %>
    <%: Html.TextBox("height") %>

    <%: Html.Label("width") %>
    <%: Html.TextBox("width") %>

    <%: Html.Label("Media") %>
    <input type="file" id="Media" name="Media" />
    <input type="submit" name=

New off line application working with sdf file. Need advice


Hey Folks

I am working on a project currently where I need to get data out of a 3rd party vendor's software that uses a .sdf file I looked this up and its a SQL CE file. I was hoping to just link to with with access but thats apparently not going to happen. I need to link to the database extract data from it to a csv file for later use. I also and most important I need to get the data from it and create a report that can be printed while on a customers site that my or may not have web access so I need for this program to be on and off line. I had my webapplication that I have been working on open and was able to bring up the sdf file under the server exploere however I can't seem to get anything out of it when I try to do grid views or detail views errors out.

Can I use one of Visual Studio projects to create this sort of applicaiton if so what would be the best approach. I would love to get an access odbc driver since office is allready installed on the employee's laptop's



Read Excel file from Web Application (C#)



I have a web app where user uploads a file.

File is saved in server locally and I want to read some data from it.

Currently my development  server has office 2003.

So do I need office 2007 in order to be able to  read an excel from office 2007 ?

What are other requirements  ?

I tried a test, using

Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application();
Microsoft.Office.Interop.Excel.Workbook wrkBook; // = new Microsoft.Office.Interop.Excel.Workbook();

wrkBook = excelApp.Workbooks.Open(@"C:\www\excel_files\b.xls", ....);

But When trying to open the file I get the error:

Exception from HRESULT: 0x800A03EC

So I'm wondering what I'm missing.


Need Oracle Data Provider .CS File for Oracle 10g Database connection !



I need a 'Wrapper.cs' file which takes care of the Database connection ( Oracle 10g) where

i can just call the method with my SQL Query


Gridview1.DataSource = SampleWrapper.ExecuteDatatable("THE SQL QUERY");


Plz Post the link if there is any open source !    

Upsize Your Database: Convert Your Microsoft Access Application to Take Advantage of SQL Server 7.0


What if you need to convert an existing Microsoft Access 97 database application into a true client-server application that is based on a SQL Server back end? If you know a little about Visual Basic and SQL Server, it's easy to make your app take advantage of the power and scalability provided by SQL Server 7.0. Using some concrete code examples, this article takes you step by step through converting the native Jet queries in your Access application into stored procedures and pass-through queries that SQL Server can use. You'll also learn how to pass on parameters when your client-server app calls these SQL Server stored procedures and queries.

Michael McManus

MSDN Magazine June 2000

update user status in database when ever user logoff


actually i came across this senario for new project where userstatus must change to log off when ever he do fallowing activity.I have maintain user status when he log in to web based system.

Activities are


1.user click log off

2.or user click browser close button or close brwoser tab.

3.or Fource fully shut down his Pc

I am able to get first 2 but not the last one.I googled it but not get any satified ans for that.

I m looking for guidens for this. Any help is grate help for me as i want it.And also other suggesstion also welcomed.

thanks in advance


VS2010 Express ASP.net and database file with SQL Authentication



I have installed Visual Studio 2010 Express in my local system.

1. File->New Website
2.Open datbase explorer, right click on dataconnection
3.Select Create new connection
4.use Microsoft SQL Server Database file
5. Type new databse filename
6. Now i want to use SQL authentication which is not working
7.If we use windows authentication its wokring without any problem
8.But i need sql authentication to be used.
9.I have not installed SQL studio. I am only using the one which is packaged in VisualStudio 2010 SQLClient.

Let me know how can we create a new database file with userID and password. So that i can host it in other systems as well without any windows authentication.

Thanks and regards
Mahesh kotekar

VS2010 Express ASP.net and database file with SQL Authentication - How to create database file with


Hi, I have installed Visual Studio 2010 Express in my local system.

Steps 1. File->New Website

 2.Open datbase explorer, right click on dataconnection

 3.Select Create new connection

 4.use Microsoft SQL Server Database file

5. Type new databse filename

6. Now i want to use SQL authentication which is not working

 7.If we use windows authentication its wokring without any problem

8.But i need sql authentication to be used.

 9.I have not installed SQL studio.

 I am only using the one which is packaged in VisualStudio 2010 SQLClient. Let me know how can we create a new database file with userID and password. So that i can host it in other systems as well without any windows authentication.  I know that VS2010 setup also installs the SQL client which is requiredto create and manage sql databse files/quries etc


i dont know the default userID and password for SQLauthentication. As the express setup did not asked any credentials while installing SQL components


Thanks and regards

 Mahesh kotekar


execute update timedout expires , table with trigger due to recovery of database


I have table A in database A  , in table A i have trigger to insert record to database B table A, each update and insert of database A -table A, triiger fire and insert record in database B table A, when i try to update some times asp.net application gives error

"Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding."

and then error log says System.Data.SqlClient.SqlException: Database 'database B is being recovered. Waiting until recovery is finished.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean ret

how to consume the dll file which is registered in GAC, into my asp.net web application



i have created a strong name key to my dll file...and then i have added it to GAC.

In general, to add a .dll file in the solution explorer, right click -> add reference...

How should I refer the dll file registered in  GAC



Insert Excel Data via File Upload into sql server database???

Hi all, I have requirement that User can Upload the Excel Sheet Data to sql server Database at once. How i do that Any Article or hint is apperciated.   Regards 

Creating an database search application in VS C#

Hello everyone, I wish to create a C# application that will have a form and a text box where I can enter a text, and then ask the application to search if this text exists in a database. If it exists, I want all the information associated with this text to be displayed in a datagrid view or list box. I am able to create a database in SQL Server and I can connect to my database from VS 2005 C#. If this is possible, how do I go about it? Many thanks in advance.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend