|
the all .bak file which is stored in the following folder in my system
E://DATABASE_BACKUP/
|
|
|
|
|
Not clear!
Are you using Management Studio? Want to write code?
All BAK files go to the same DB or to separate DBs?
You have to provide much more details to get some valuable answers...
(And try to post DB questions in the right forum - this one is for C#)
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
i am using Sql Server 2008 and want to be restore multiple .bak file at a time with different Name which is stored in E://DATABASE_BACKUP/
and where exactly should i restore all database
how to write script
can you explain step by step
|
|
|
|
|
I'm making a content editor for my website.
To keep it simple, I will create a html file and store it in App_Data. A server control on the front end will read the html file in App_Data, and print the contents of it where its placed on the page.
I built an editor on the back end using ckEditor. Wrote a program to take the contents of the ckEditor, and write an HTML file to the App_Data folder.
So the program gets the HTML from ckEditor, passes it as a unicode string, converts it to a byte array, and writes the bytes using FileStream.
I want to store some extra stuff in the file besides HTML like
Created By:
Revision:
Template:
Without me just going off writing code on a bad idea, I thought maybe I'd try and get some suggestions
Here are some bad ideas that I have:
Write a block of XML at the beginning of the file, on read, consume the XML, then digest and print the HTML.
Just write a block of some format, and do the same as above, but what format?, XML, JSON, ?
Write a separate file such as xml, that describes the html file.
Overall, in the end, I want to be able to just read the files in the /APP_Data/CE folder so I can load a list of registered editable content within my website.
I found this, but not sure if it's viable.
http://www.howtogeek.com/howto/windows-vista/stupid-geek-tricks-hide-data-in-a-secret-text-file-compartment/[^]
Would it be possible to just make a structure, convert it to bytes, and wrap it or something, and place it at the beginning of the file?
modified 30-Aug-14 23:00pm.
|
|
|
|
|
Writing dynamic data to html file, text file or xml or any flat file is not a good idea. These files are meant to store configuration related stuffs.
You should not store user provided data at the same place where the application is hosted. You will have a very hard time to backup, migrate or scale your app to web farm application or implement any further level of change.
I would recommend to use database for your issue. With database, it will be easy to migrate, schedule backup, query, cache, scale etc.
Life is a computer program and everyone is the programmer of his own life.
|
|
|
|
|
What do mean by dynamic data?
It's just a HTML file with HTML on it. Just website content, words and pictures.
I just wanted to store some extra stuff like in a image file, just some data.
But I'm starting to think that's its a bad idea anyways.
Today I wrote some code that makes a XML file that represents the editable content, and the XML file points to the HTML file.
|
|
|
|
|
Alright I get it now.
Had to think about that for a while.
How about if I store the final post to the database?
In other words, let them use the temp html file in app_data so they can build there content over time, and then write the HTML to the database when they are ready to post it to the website as the final revision.
|
|
|
|
|
i use sql dependency related code in globa.asax file to detect db change notification. i just start the sql dependency from Application_Start event in global.asax file and also called a function which monitor db table change and send notification. every thing is working fine if
application pool
is running means at least one user is on our web site and at the same time db table change occur.
suppose when db change occur and at the same time
application pool
is idle or no visitor is visiting our web site then change detection routine is not getting invoke automatically.
here is the code
protected void Application_Start(Object sender, EventArgs e)
{
System.Data.SqlClient.SqlDependency.Stop(connectionString);
System.Data.SqlClient.SqlDependency.Start(connectionString);
RegisterNotification();
}
static SqlDependency dep;
private static void RegisterNotification()
{
string tmpdata = "";
try
{
using (SqlConnection conn = new SqlConnection(connectionString))
{
conn.Open();
SqlCommand cmd = conn.CreateCommand();
cmd.CommandText = "SELECT ActivityDate FROM [bba-reman].ContentChangeLog";
dep = new SqlDependency(cmd);
dep.OnChange += new OnChangeEventHandler(OnDataChange);
SqlDataReader dr = cmd.ExecuteReader();
{
while (dr.Read())
{
if (dr[0] != DBNull.Value)
{
tmpdata = dr[0].ToString();
}
}
}
dr.Dispose();
cmd.Dispose();
}
}
finally
{
}
}
static void OnDataChange(object sender, SqlNotificationEventArgs e)
{
SqlDependency dep = sender as SqlDependency;
dep.OnChange -= new OnChangeEventHandler(OnDataChange);
SiteSearch.CreateIndex(false);
RegisterNotification();
}
protected void Application_End(Object sender, EventArgs e)
{
System.Data.SqlClient.SqlDependency.Stop(connectionString);
}
just discuss how could i restructure my routine as a result
OnDataChange()
will fire if application pool is idle or if no visitor is visiting my web site.
one guy told me very vaguely
you are use the thread from the thread poll for the first request. as asp.net recycles threads and actions like redirect abort the thread, you need a safer thread to perform your action one. so in application start you should start a background thread to handle the dependency.
so please some one discuss this issue in details as a result my above code should run perfectly when no visitor is visiting our web site any page. thanks
tbhattacharjee
|
|
|
|
|
i through i will call SQL Dependency related code Application_Start event and my objective will be completed. my scenario is i have a routine in my web application which i invoke manually just clicking on a button when data updated in sql server table. i was told to make this process automated.
so i go through couple of article on SQL Dependency and through i can make my manual process automated by SQL Dependency because we can monitor table change by SQL Dependency and SQL Dependency can notify us when change done.
please see my code
protected void Application_Start(Object sender, EventArgs e)
{
System.Data.SqlClient.SqlDependency.Stop(connectionString);
System.Data.SqlClient.SqlDependency.Start(connectionString);
RegisterNotification();
}
static SqlDependency dep;
private static void RegisterNotification()
{
string tmpdata = "";
try
{
using (SqlConnection conn = new SqlConnection(connectionString))
{
conn.Open();
SqlCommand cmd = conn.CreateCommand();
cmd.CommandText = "SELECT ActivityDate FROM [bba-reman].ContentChangeLog";
dep = new SqlDependency(cmd);
dep.OnChange += new OnChangeEventHandler(OnDataChange);
SqlDataReader dr = cmd.ExecuteReader();
{
while (dr.Read())
{
if (dr[0] != DBNull.Value)
{
tmpdata = dr[0].ToString();
}
}
}
dr.Dispose();
cmd.Dispose();
}
}
finally
{
}
}
static void OnDataChange(object sender, SqlNotificationEventArgs e)
{
SqlDependency dep = sender as SqlDependency;
dep.OnChange -= new OnChangeEventHandler(OnDataChange);
SiteSearch.CreateIndex(false);
RegisterNotification();
}
protected void Application_End(Object sender, EventArgs e)
{
System.Data.SqlClient.SqlDependency.Stop(connectionString);
}
the above code was running fine but i faced a good problem. suppose no visitor is visiting our web site and at the same time if some one change sql data by a win apps then i saw OnDataChange() event is not firing but if at least one visitor is with our site then OnDataChange() event is firing properly.
may be this is default nature of asp.net engine. i could use SQL Dependency in win service or in winform apps but i have some constrain because the routine which i am calling after detection of data change in db that is in our web application.
So please guide me what i can do as a result OnDataChange() event should always fire if no visitor is visiting our web site.
thanks
tbhattacharjee
|
|
|
|
|
Actual Source code exist in vs2010, Now i am converted into vs2012, this source code working fine for some days, but recently i got this error.
Compiler error Message : Metadata file 'C:\Users\Arka\AppData\Local\Temp\Temporary ASP.NET Files\root\5c0b21a7\1cd1610d\App_Web_kog0qzeo.dll' could not be found
how to solve this issue.
Please help me....
Thanks in Advance..
|
|
|
|
|
The message seems quite clear; check the location for the file in question.
|
|
|
|
|
Something went wrong with your ASP.NET temp folder (there should be files from older - 2010 - compilation that prevent 2012 to create new ones but also prevent 2012 to overwrite them...) - my advise is to delete it (wipe it out!) and recompile your project under 2012...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Hi friends
Flipkart Api can i use in asp.net
If Possible can give me sample Code
Thank You
|
|
|
|
|
I think there is no api for FlipKart. There is some affiliate program. If you want to know more ask to affiliate@flipkart.com
|
|
|
|
|
|
Hi friends
Please help me
how to use datapager with repeater in asp.net
Thank You
|
|
|
|
|
|
yes this is a good solution
Sankarsan Parida
|
|
|
|
|
Hello,
I am using ASP.Net to call crystal report..Not able to display the report using chrome browser but working fine with IE and Firefox.
Chrome version: 36.0.1985.143 m
Crystal Report Viewer version: 11.0
PLease help me in this regard.
Thanks,
SMA
|
|
|
|
|
You need to right click on the element and select inspect element, and verify or inspect the element to see what is wrong. It's not a common problem, so you need to do some detective work on it.
|
|
|
|
|
Good day everybody. Please, is it possible to call the onitemcommand of datalist control on page load event. If yes, how can it be done. Please help
|
|
|
|
|
Please do not repost the same question.
|
|
|
|
|
Please, i didn't meant to repost same question. It was network condition and i didn't know my question was already posted. Pardon the mistake
|
|
|
|
|
Good day everybody. Please, is it possible to call the onitemcommand of datalist control on page load event
|
|
|
|
|