|
Hi,
Iam getting this error if i compile a project.
error BC31019: Unable to write to output file 'F:\VISTA_EXPRESS\sourcecode\VistaExpressUtil\obj\Debug\VistaExpressUtil.dll': The process cannot access the file because it is being used by another process.
The sln consists of many projects and there are being referenced using Project reference rather than file references, but still the problem.
I tried restarting the system, but still the problem is there.
Any help will be greatly appreciated.
Thanx
saleem
|
|
|
|
|
In one of my solutions (I think it consists of about 25 projects) I also have this problem. Ive even discovered that in this particular case the problem only arises in Release but not in Debug mode. My workaround is to switch the property "Local Copy" (right click the reference and click properties to find it) of the referenced dlls to false. I make this in every project for every Reference where the error occurs. A little problem with this workaround is that sometimes (dont know when it happens exactly) the final output is not 100% up to date. So you should check the output by yourself after doing this.
|
|
|
|
|
Hi Robert,
Iam getting this problem in the debug mode itself.
It's a form application with 20 project references.
Is there any other info u can provide ??
saleem
|
|
|
|
|
I think i got a work around to the problem. Earlier all my binaries output were in the local view of the VOB (Versionised object base). If the output is directed to a folder in the Hard disk ( say, C:\myfolfer\bin), the problem does not occur.
Hope anyone else need not spend time and effort as i did.
Regards,
Saleem
|
|
|
|
|
hi all,
i'm trying to do something seemingly simple, but it's one of the hardest things to google for: Adding a text file into a project (not its path, the file and contents themselves). I'm trying to do this to hardwire in a list of words with my application (about 5000 of them), and would like to avoid having to read them from a text file on the filesystem at runtime.
If you know how to do this, and how to actually read its contents at runtime or even compile time (i know how to use stream readers, but would probably need to know what to give a streamreader constructor), I'd be very grateful for your help. Alternatives are welcome.
If not, thanks for reading this far in an attempt to help...
Z
|
|
|
|
|
You put the file in your project folder, then in Visual Studio right click the project in the Solution Explorer and select Add-->Add Existing Item... then select the file from the file dialog. Select the file in your project in the Solution explorer and press F4 (or right click it and select Properties). In the properties change the Build Action to "Embed Resource" (this will mean that the file will be built into the assembly DLL or EXE file that your project produces)
Next you need to get the file out at run time. For example:
Assembly asm = Assembly.GetExecutingAssembly();
string manifestName = string.Concat(asm.GetName().Name, ".",fileName);
Stream str = asm.GetManifestResourceStream(manifestName);
StreamReader reader = new StreamReader(str);
string scriptSource = reader.ReadToEnd();
You can also find an example that embeds SQL Queries into resources and then runs them against a SQL Server in my blog[^]
Does this help?
Do you want to know more?
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums Upcoming talk:
SELECT UserName, Password FROM Users
-- Getting unauthorised access to a SQL Server, and how to prevent it.
|
|
|
|
|
it certainly does, that's EXACTLY what i was looking for, thanks you very much!
just so i don't have to keep posting and pestering people, is there a resource (no pun intended!) on the web where an example just like this is posted? Would be good to add them to my list of bookmarks...
thanks again
Z
|
|
|
|
|
|
Is there anybody succeed in displaying unicode (especially Thai words) in MsFlexGrid Control?
Thanks in advance for your kind feedback.
|
|
|
|
|
Is there a way to remove the background image from a button, programatically--not manually?
Thanks
|
|
|
|
|
|
button1.BackgroundImage=null;
worked just fine...Thank You.
Paul
|
|
|
|
|
Hi
I have a program. The program functions such that it creates a xml file with data's for any xml schema file(.xsd). It automatically creates data's for each datatypes.
Now I have to input into a single field column with values from another xml file. (for the existence of same field name in the schema) the program should read the schema and check whether any field name is same as that of that input xml file and if exists, then add the values of the input xml into the new xml file .
I have done it as follows
private void button2_Click(object sender, System.EventArgs e)
{
dataSet1.ReadXmlSchema(txtSchema.Text);
XmlDocument xdc = new XmlDocument();
foreach (DataTable dTbl in dataSet1.Tables)
{
object[] oValues = new object[dTbl.Columns.Count];
xdc.Load(@"C:\CDEV\testdatagenerator\FIELDNAMES.xml");
int i = 0 , iIndex = 0;
foreach (DataColumn dColmn in dTbl.Columns)
{
if(dColmn.ColumnName.ToString() == "billto_name" )
{
iIndex = i;
break;
}
i++;
}
xdc.Load(@"C:\CDEV\testdatagenerator\vw_forecast.xml");
XmlNodeList nodeRows = xdc.DocumentElement.SelectNodes("//billto_name");
XmlElement Root = xdc.DocumentElement;
nodeRows = Root.SelectNodes("//billto_name");
for(int j = 0; j <= 200; j++)
{
int k = 0;
foreach (DataColumn dColmn in dTbl.Columns)
{
if(k == iIndex && i < nodeRows.Count)
oValues[k] = nodeRows.Item(i).InnerText ;
else
{
switch(dColmn.DataType.ToString())
{
case "System.String":
oValues[k] = (string) "castle Hampers" + j;
break;
case "System.Int32":
oValues[k] = (int) 66 + j;
break;
case "System.DateTime":
oValues[k] = new DateTime(2004,01,30).AddDays(j * 1);
break;
case "System.Decimal":
oValues[k] = new Decimal(1900.20) + j;
break;
case "System.Int16":
oValues[k] = (short) 3256 + j;
break;
case "System.Int64":
oValues[k] = (long) 400 + j;
break;
case "System.Double":
oValues[k] = (double) 8888 - j;
break;
case "System.Single":
oValues[k] = (float) 4.5 + j;
break;
}
}
k += 1;
}
i++;
dTbl.Rows.Add(oValues);
}
}
}
I was aked to do as follows
IF the input xml file contains the column name “ADDRESS”
Open the new input file ADDRESS.xml which is just a text file
(there is no schema in this file) containing about 50 valid values of ADDRESS and put them in the output file in the right column.
To make the process more generic what you should do is:
CREATE A NEW XML FILE CALLED SAY, FIELDNAMES.XML
This file is again just a text file containing just the actual field
names. There is no schema for this file. For the time being let it just
contain 1 line of text which says ADDRESS
So first loop through the schema in your input file (i.e the input file
you have entered on screen)
If any field name from the schema exists in the file FIELDNAMES.XML,
store the position of this field name and the fieldname in an array.
So if in your input file ADDRESS field is the 4th field, this array
will contain (4 , ADDRESS)
Then when you are looping through in your program to build the 200
records, Compare the field number to the field number in the array and when they
are equal update it correctly.
SOME HELP FOR THAT WITH CODINGS.
PLS HELP ME TO DO THIS
as the "Load" button is clicked. It is a kind of pseudo code.
xdc.Load(@"C:\CDEV\generator\testdatagenerator\FIELDNAMES.xml");
Read through this file and create an ArrayList
ArrayList fieldnameslist = new ArrayList();
fieldnameslist.Add(text from FIELDNAMES.xml)
Here you must include code to build an ArrayList from the file FIELDNAMES.xml
See code below. You are expected to put the code properly.
Create a separate class which looks as follows:
public class DataCol
{
public int ColIndex;
public string ColDesc;
public DataCol()
{
}
public DataCol(int colindex, string coldesc)
{
this.ColIndex = colindex;
this.ColDesc = coldesc;
}
}
Instantiate an ArrayList
ArrayList mylist = new ArrayList();
foreach (DataTable dTbl in dataSet1.Tables)
{
int i = 0 , iIndex = 0;
foreach (DataColumn dColmn in dTbl.Columns)
{
for (int y = 0 to y <= (fieldnameslist.count-1))
{
if(dColmn.ColumnName.ToString() == fieldnameslist[y])
{
iIndex = i;
mylist.Add(new DataCol(ilindex, fieldnameslist[y]));
HERE YOU CAN CREATE THE FILENAME TOO FROM FIELDNAMESLIST[Y] AND OPEN IT - FOR EXAMPLE ADDRESS..xml
break;
}
}
i++;
}
}
All you have done in the above code is create an array list with the column number and column desc.
So say the file FIELDNAMES.xml has the text billto_name and the text shipto_name
Then if in the input file that I have entered on screen has billto_name as the 5th column and shipto_name as the 7th column in it's schema then,
ArrayList myList[0] colindex will be = 5
myList[0] coldesc will be = "billto_name"
myList[1] colindex will be = 7
myList[1] coldesc will be = "shipto_name"
After this you will have to loop through your DataTable dTbl again and compare the ColumnName to ColDesc in the ArrayList mylist while building the records.
please help me to do this. I need some coidng help. Help me to finish it in full way.
ramya
|
|
|
|
|
I would like to pull out some icons from
Windows (Its Shell32 Dll)to Image list
How can i approach to those icons ??
C# Windows Form
|
|
|
|
|
How can read a text by text to speech microsft engine ?
Regards' AmirJalaly
|
|
|
|
|
Hi All,
I have a listview which I have enabled multiselect and want to delete all of the user selections.
The user presses a button to do this. How can i delete all selected rows in the listview?
Thanks for the help.
Stephen
|
|
|
|
|
Hi!
The first approach would probably be to iterate over the SelectedIndices collection and to remove the items in there. You have to be careful, though, not to alter the collection inside the loop.
So I'd suggest a for loop instead of a foreach and to iterate over the Items collection and to check for the Selected property:
for (int i=0; i<ListView1.Items.Count; i++)
{
if (ListView1.Items[i].Selected)
{
ListView1.Items.RemoveAt(i);
i--;
}
}
(written from memory, no guarantee for correctness )
mav
|
|
|
|
|
The code isnt complete. I would suggest:
<br />
for (int i = ListView1.Items.Count - 1; i >= 0; i--)<br />
{<br />
if (ListView1.Items[i].Selected)<br />
{<br />
ListView1.Items.RemoveAt(i);<br />
}<br />
}<br />
|
|
|
|
|
You're right, I forgot to escape my <
Sorry for not verifying the results...
My for loop was:
for (int i=0; i<ListView1.Items.Count; i++)
mav
|
|
|
|
|
Can anyone please guide me how to set the properties of Windows Control Library dll when we are using it in HTML page ?
Say for ex:
<OBJECT id="ucl" name="ucl" classid="http://localhost/UserCtrllib/ControlLibrary.dll#ControlLibrary.rtfcontrol" VIEWASTEXT width=275 height=500></OBJECT>
I have a property : FileName in the rtfcontrol class. I need to assign file for the file name thru html.
How will i do that ? It tried the following
<script language =javascript>
function callFun()
{
ucl.FileName = "abcdefg.xml";
}
</script>
but says ucl is undefined.
Let me know where have I gone wrong ?
-Sreenath
|
|
|
|
|
hello i have a program using a TcpListener and x number of Sockets each has thier own thread my real question is how to i determine if the sockets have lose thier connection i have a thread that handles the sockets connection and determines if the user has sent any data or not and then passes it off to the main thread. i tried using Socket.Connected but it didnt do anything i have a try block within the user thread and i tried using catching a SocketException but that didnt work either what are your suggestions
thanks
|
|
|
|
|
If I want to insert 100000 record. What are the fast way to insert. I use Microsoft Access
|
|
|
|
|
First, don't use Access.
Second, no matter what, this is going to take a while. Access is file based meant as a small desktop database, not the monster your about to make it with that kind of an import.
Access/Jet doesn't have a bulk import ability like SQL Server does, at least programatically. Depending on the source of the data, you can import delimitted text files, but only in Access. Access parses up each line and INSERT's the data one line at a time. Your app will have to do the same thing, call an SQL INSERT statement for each and every record that your going to put into the database.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello,
I'm trying to hash a password so that only the hash is stored in the database and not the password itself. Can I use FormsAuthentication.HashPasswordForStoringInConfigFile in a Windwos Forms application? Or is ther anything similar?
Thanks,
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|