|
InvalidForumException was thrown by your question. Please make sure you post your question in correct forum. Your post has been terminated.
|
|
|
|
|
Good one
The need to optimize rises from a bad design
|
|
|
|
|
Thanks
|
|
|
|
|
this is the true new kind of exception that i can find only in this forum, Chris should have this as a shortcut
dhaim
programming is a hobby that make some money as side effect
|
|
|
|
|
hi
i use these code for restore
this.openFileDialog1.ShowDialog();
if ((this.openFileDialog1.FileName != "") && (this.openFileDialog1.FileName!="openFileDialog1"))
{
try
{
filename = openFileDialog1.FileName;
SqlConnection SqlCon = new SqlConnection();
SqlCon.ConnectionString = global::project.Properties.Settings.Default.dabirkhanehConnectionString;
SqlCommand SqlCom = new SqlCommand();
SqlCom.Connection = SqlCon;
SqlCon.Open();
SqlCom.CommandText ="ALTER DATABASE dabirkhaneh SET SINGLE_USER WITH ROLLBACK IMMEDIATE" +" USE master; RESTORE DATABASE dabirkhaneh FROM DISK =N'"+filename+"'";
SqlCom.Connection = SqlCon;
SqlCom.ExecuteNonQuery();
SqlCon.Close();
SqlCon.Open();
SqlCom.CommandText ="ALTER DATABASE dabirkhaneh SET MULTI_USER ";
SqlCom.Connection = SqlCon;
SqlCom.ExecuteNonQuery();
SqlCon.Close();
MessageBox.Show("بازیابی با موفقیت انجام شد");
}
catch
{
MessageBox.Show("بازیابی با موفقیت انجام نشد");
}
}
but i have error;
The tail of the log for the database "vezaratekar" has not been backed up. Use BACKUP LOG WITH NORECOVERY to backup the log if it contains work you do not want to lose. Use the WITH REPLACE or WITH STOPAT clause of the RESTORE statement to just overwrite the contents of the log.
RESTORE DATABASE is terminating abnormally.
Changed database context to 'master'.
please help
thanks
|
|
|
|
|
This would be SQL and Database discussions[^] question.
However, the error is very clear. Have you tried tail-log backup before restore or forced restore as the error describes?
The need to optimize rises from a bad design
|
|
|
|
|
Sometimes my projects require external files, for example DLL-files or GIF-images. I would like to include those files inside the exe-file so I only have one file to distribute to the users. It would be acceptable to put the bytes from the files into arrays and then somehow make those arrays look like files to the software. How do I do that?
|
|
|
|
|
If you want to merge things together, take a look at ilmerge[^].
|
|
|
|
|
Apart from IlMerge that Pete suggested, you can use .NETZ[^]
|
|
|
|
|
Thanks for your suggestions. However, there are some cases where I'd really like to include the file-data inside my source code. For example, in a lot of my project I'm re-using a custom-made MessageBox with an hour glass and it bothers me that I also need to include the gif-file with the hour glass icon every time I need to use this piece of code. I think it would be much more convenient to have everything inside the same class and file. How can I do that?
|
|
|
|
|
If you add the gif file to the resources of your custom made messagebox then you will not need to include it in every project.
|
|
|
|
|
How do I do that? My MessageBox is just a plain .cs file, I did not use the designer in Visual Studio to create it.
|
|
|
|
|
In that case I am not sure whether you can do it or not. However, when you build applications using designer you can embed images in the application so I believe the same is true for dlls too.
|
|
|
|
|
Whenever I need my hour glass MessageBox in a project, I want to simply grab one .cs file from my source control software and insert it into my project. Therefore, I prefer not to use the designer because then there are various dependencies. Thank you anyway for your input.
|
|
|
|
|
You can build a dll for you messagebox and just add reference to it whenever you need it. Then you can just use ilmerge or the tool suggested by me to merge dlls and application.
Another way is to include your image as byte[] in your source code and then create memorystream from it. Than you will be able to get the image too. Though I don't like this solution.
|
|
|
|
|
I don't like to make DLLs if I don't have to. If I find a bug in my MessageBox in the 10th project I'm using it in, I can easily step through the code and locate bug in the same project. Also, source code is always king when it comes to configuration management. Memorystream seems to be exactly what I was looking for. Thanks a bunch!
|
|
|
|
|
You are welcome
|
|
|
|
|
Hi all,
One way of displaying map of an area for a gps application is to have simple map image (e.g., jpg) together with geo coordinates of its each corner. since, I am just starting with this kind of application can anyone let me know if there is a better (standard) map file format? I need to display current location in the map and possible navigate user to certain point. the area of coverage is quite small (factory area).
regards,
rnv
|
|
|
|
|
Hi,
Refer to the following link:
GPS Mapping[^]
Map Grabber[^]
I hope this would give you better idea to start from.
John Adams
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
thank you John,
I already had a look but maybe i missed it..i could not get it correctly. If I have an image of an area (jpg) somehow i should specify its coordinates. is it specified in a separate file from the jpg file itself?
I managed to run map grabber example but it only creates jpg images. where are coordinates saved?
regards,
rnv
|
|
|
|
|
Hi There,
I would like to know if someone can assist me with the following:
I need to display data in a tabular format, but I would like to group the relevant data together. In the sample below I am using a asp:repeater to populate a table. The select statement in my code behind file would return data from different employees within different companies ordered by the company name. I want to group all employees from one company together and do a basic summary line before starting with the next company i.e. Number of employees found per company.
<asp:repeater id="employeeList" Runat="server">
<HeaderTemplate>
<tr>
<td width="200">
Company ID
</td>
<td width="200">
First Name
</td>
<td width="200">
Last Name
</td>
<td width="200">
Company
</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr bgcolor="#ccffff" style="FONT-SIZE: 12px; COLOR: red">
<td><%# DataBinder.Eval(Container.DataItem,"COID") %></td>
<td><%# DataBinder.Eval(Container.DataItem,"FIRSTNAME") %></td>
<td><%# DataBinder.Eval(Container.DataItem,"LASTNAME") %></td>
<td><%# DataBinder.Eval(Container.DataItem,"COMPANY") %></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:repeater>
|
|
|
|
|
Hai
Give me solution for converting the following
1) Ensure safe and proper custody of the proximity card at all times .2) Report to authorities, in case of a) Malfunctioning of card b) Loss of card
to:
1) Ensure safe and proper custody of the proximity card at all times .
2) Report to authorities, in case of
a) Malfunctioning of card
b) Loss of card
Thanks in advance
Praji
|
|
|
|
|
KP_Prajilal wrote: Give me
Thats a bad start.
You could use IndexOf or regex to help you find any instaces of ')' in your string, then once you've found a ')' you could replace the preceding space with an Environment.Newline
My current favourite word is: Nipple!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
Hi,
I am looking at a way to do zip compression in C#. Is there any free library that do zip compression as fast as winzip?
Thanks
|
|
|
|
|