|
I have created solution through in vs2010. Once i go to solution folder i have seen one of the file called sdf extension with solution name. I don't know why its getting created.
How these can be avoide
Regards
Gopal
|
|
|
|
|
AFAIK, this is a SQL Server Database file that can be opened in Visual Studio.
However, I'm not absolutely certain about either of these as I have not used these files myself.
My signature "sucks" today
|
|
|
|
|
.sdf files are created by SQLServerCompact (and possibly othe SQLServer variants - I don't use them so I'm not sure).
If you added a DataSource to the project or selelcted a DB project then it may have been automatically created for you.
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
This is a SQL CE file and is created by Visual Studio. It contains information used internally to manage the projects within a solution.
It's time for a new signature.
|
|
|
|
|
Your question sparked my interest some more, and I just found this information[^].
It's time for a new signature.
|
|
|
|
|
how to compare two diffrent arrays to search the same values. we have to check the inde of two arrays that which position contain the same values
|
|
|
|
|
|
Hi,
Can any one tell me, How to combine byte array with sql command in c#?
i have written code in c# like
bytes[] byteData
Update table1 SET col1="'" + byteData + "'" where colid=1
But this command convert in formate like
Update table1 SET col1='System.Bytes' where colid=1.
|
|
|
|
|
If you are trying to save an image to a database, you can take a look at this article here.
My signature "sucks" today
|
|
|
|
|
Thankx for help, but i alrady familiar with this example as you shown to me.
but i want to append the bytes array with sql command. Do you have any other example which can be help full?
|
|
|
|
|
Please use input parameter.
sql_string = "update table_name set field_name = @field_value where ...";
SqlParameter param = new SqlParameter();
param.Parameter = "@field_value";
param.DbType = DbType.Binary;
SqlCommand.Parameter.Add(param);
|
|
|
|
|
If you try to inline the array into a string C# compiler will create a ToString() call, that's why you're getting a 'System.Bytes' instead of array values. I think you should try to use SqlCommand parameters instead.
SqlCommand cmd = new SqlCommand("Update table1 SET col1=@ByteArray where colid=1", conn) ;
cmd.Parameters.Add("@ByteArray", <Correct Column Type>).Value = byteData;
cmd.ExecuteNonQuery() ;
Almost the same as the image example....
Greettings.
|
|
|
|
|
Hi all,
I have a word file in a format (means some text ans a table, etc...) and I want to create different files by changing different places on it. How can I do this in C#.
I've heard that dot file use as templates and work on. But I couldn't find any article. Can anyone of you guide me.
Thanks.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
The nmost likely API set you want is the VSTO interface from Microsoft. It's a .NET Interop Assembly to the MS Office COM API's.
It is an enormous set of API's, a COM wrapper with all the COM pitfalls plus the myriad versions of MS Office, so test thoroughly. There is a ton of information on using VSTO you can find on the web. Here is a starting point:
http://msdn.microsoft.com/en-us/vsto/dd164295.aspx[^]
-- Christo
|
|
|
|
|
Thanks a lot.
I'll go through it and let you know if I'm stuck on anything.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Hey, no problem. VSTO is pretty huge -- there are many API's for each of the Microsoft Office applications, particularly Word and Excel. As a tip, I've found one is better off using Google or some other web search engine to ask questions about VSTO API's and how to do things. Programmers frequently post questions about VSTO workings, and the programmers' forums on the web (including CodeProject!) are often a much better resource than the Microsoft documentation. VSTO is an interop assembly for the long term established COM interface to Office, it has been under development for a long, long, time, and it is enormous.
|
|
|
|
|
I have a class like this:
<pre>
public class EmpCtg
{
public int ID { get; set; }
public string Name { get; set; }
public EmpCtg Parent { get; set; }
}
</pre>
Collection of this class:
<pre>
List<EmpCtg> ListEmpCtg = //....get list<empctg>
</empctg></pre>
I want binding ListEmpCtg to TreeView, and show look like this:
<pre>
EmpolyeeCategory
|
---------Ctg1
|
|
---------Ctg2
| |
| |
| --------Ctg3
| |
| |
| --------Ctg4
| |
| |
| --------Ctg5
.
.
.
</pre>
I know that I can write in the code by hand, but I would like to know whether to use DataTemplate?
What should I do?
Thanks!
|
|
|
|
|
I use TreeView extensively. It is a rather "unique" control with a lot of pitfalls. I strongly suggest you expend the effort and write custom code around your TreeView controls.
Otherwise, if you really want to just use binding, refer to this article on CodeProject:
Data Binding TreeView in C#[^]
|
|
|
|
|
i want delete image file.
very well insert image file to listbox.
but, do not delete image file ,
please, take me a error,,
attached the source project files,
reply send to me(sonic747@esolgorup.co.kr)
---env
c#, wpf, .net3.5
/....
source file download
//imagefile insert to listbox///
private void button1_Click(object sender, RoutedEventArgs e)
{
savepath = System.Environment.CurrentDirectory.ToString();
foreach (string f in Directory.GetFiles(savepath + "/image", "*.jpg"))
{
BitmapImage my;
my= new BitmapImage();
my.BeginInit();
my.CacheOption = BitmapCacheOption.OnLoad;
my.UriSource = new Uri(f, UriKind.RelativeOrAbsolute);
my.EndInit();
listBox1.Items.Add(my);
}
}
/////////delete image file (error) ///
private void button2_Click(object sender, RoutedEventArgs e)
{
string makestr1, item1;
item1 = listBox1.Items[0].ToString();
makestr1 = item1.Substring(8, item1.Length - 8);
listBox1.Items.Remove(listBox1.Items[0]);
if (System.IO.File.Exists(makestr1))
{
System.IO.File.Delete(makestr1); //<--error point
}
else
MessageBox.Show("Nothingfile");
}
|
|
|
|
|
sonic747 wrote: listBox1.Items.Add(my);
start here, you are adding BitmapImage object to your ListBox
sonic747 wrote: item1 = listBox1.Items[0].ToString();
what do you get when you do ToString() on that object? huh? Got Clue?
|
|
|
|
|
Again?
You can't delete an image that is in use.
And it remains in use until you:
- remove all references to it (as in ListBox.Items)
- AND call Dispose() on that image
And please show code snippets inside PRE tags.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
So, what is the error message and what is the value of makestr1 when it gives the error?
It would be easier to read if you use <pre> tags to format
sonic747 wrote: reply send to me(xxxx@yyyyy.zzzz)
Good luck with that!
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
modified on Tuesday, May 18, 2010 10:26 PM
|
|
|
|
|
Yikes, publishing someone's e-mail address is very naughty.
He could still have removed it in his message, but he can't change yours though. It is *not* fair.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Yes, Luc, you're right. Thanks for pointing that out -- I've modified my message.
I honestly wasn't paying attention.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Now you're again being the fair person we are used to.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|