|
1. I don't mean to be condescending, but are you sure you aren't connecting to localhost?
2. Are you able to connect to this database from Query Analyzer on the second machine?
3. Check your SQL Server settings.
Cheers,
Vikram.
The hands that help are holier than the lips that pray.
|
|
|
|
|
I am using IFilter in C# to get the value-type properties of a document by calling the
IFilter::GetChunk and IFilter::GetValue methods. I read the property name of well-known properties of
property sets whose GUID is {F29F85E0-4FF9-1068-AB91-08002B27B3D9} and
{D5CDD502-2E9C-101B-9397-08002B2CF9AE} by their respective property id.
But my query is how can I read property name of User defined properties (GUID =
{D5CDD505-2E9C-101B-9397-08002B2CF9AE}) by their respective property id.
So, would you kindly help to solve my problem?
Thank you.
|
|
|
|
|
WHat is the code of copy, paste
Sajkblbhgnyugfu
|
|
|
|
|
Copy: Ctrl + C
Paste: Ctrl + V
|
|
|
|
|
There's a clipboard class.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
I need to use Reflection to retrieve the properties of a given object. That's easy. The problem is that I don't know which object to use until run-time. The object is already available and I can't use Reflection to re-create it since its constructor is not available. Let me clarify with some code:
object obj = GetInstantiatedObject(objectName);
Type type = obj.GetType();
foreach (PropertyInfo property in type.GetProperties())
{
....
}
Does anyone know what object GetInstantiatedObject(string objectName) should contain?
Thanks in advance!
Al
- Is God willing to prevent evil, but not able? Then he is impotent.
- Is he able, but not willing? Then he is malevolent.
- Is he both able and willing? Whence then is evil?
- Is he neither able nor willing? Then why call him God?
Epicurus
|
|
|
|
|
Al Beback wrote: The object is already available and I can't use Reflection to re-create it since its constructor is not available.
I don't really understand that part - you already have an object, why not just use it?
|
|
|
|
|
S. Senthil Kumar wrote: I don't really understand that part - you already have an object, why not just use it?
Because it's not just one. Let's say that it can be up to 10 (or more), and I don't know which one I will be using until the program is run. So I can do this:
object obj;
if (name == "Object1")
obj = Object1;
else if (name == "Object2)
obj = Object2;
etc...
Then if more objects come into the picture, I have to modify this code. I'm wondering if there's a way to use reflection to avoid doing all of that.
Thanks,
Al
- Is God willing to prevent evil, but not able? Then he is impotent.
- Is he able, but not willing? Then he is malevolent.
- Is he both able and willing? Whence then is evil?
- Is he neither able nor willing? Then why call him God?
Epicurus
|
|
|
|
|
Hello.
I want source code convert PDF to HTML/XLS.
If you know about this, Please tell me.
I want your kindly help.
|
|
|
|
|
Good luck - I answer the pdf question with 'buy a library' all the time, but I've never seen one that does what you want.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Please can anyone help!
I need to use the API for Accpac to create views and send information to and from databases. Does anyone have experience in working with the Accpac API and if so can you please tell me how will I create a View with it??
I have allready sorted out the code to create a Session using the API and C# but the Views are the Worst! and there's absolutely NO documentation on the API whatsoever...
Thank you kindly for you assistance!!!
Illegal Operation
|
|
|
|
|
Deep cloning will allow me to make changes to the copy of the object withput making changes to the original object rite? Is this correct? So How do i deep clone, now thts the problem? Can anyone help me with this.?
|
|
|
|
|
Deep cloning requires manual coding. Normally a deep clone is not necessary. If you want to author one merely clone every object in the entire chain of the instance of the class that is not a value type. It can get deep which is why a shallow clone is most often used.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
I am totally confused. I have an object called PQueue and i am displaying the items in the queue to do that i have to remove the items from the queue. having done that the queue becomes empty. So i thougt i would need a copy of the object to keep that intact while i remove from the other one? Have i got verything wrong? Do i make sense?
|
|
|
|
|
Here is a sample:
define an object called customer.
define an object called order.
public object Clone(){
Customer customer = (Customer)MemberwiseClone();
customer.mOrders = new List<order>();
foreach(Order order in Orders){
customer.mOrders.Add((Order)order.Clone());
}
return customer;
}
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
I am in a scenario where my table's datastructure keeps on changing. For eg. sometimes the primary key changes, sometimes the field name changes and so forth. Is there any tool in the internet which helps in monitoring such kind of changes by comparing the previous database and the changed database?
If you have any idea of such tools, could you please post it here? Because it is giving me a very hard time.
|
|
|
|
|
We use Red-Gate comparer to compare databases. you can check it in Red-gate.com. It also alows tou to create scripts depending on a db schema.
meanwhile the question is..What is the scenirio there your db schema keeps on changing. If the promary key keeps on changing then it is no more a promary key itself.
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
im trying to merge Graphics to an Image, for example : i have declared 2 Graphics variable for Global access of form, now i put this code on formsLoad event :
Graphics G = Graphics.FromImage(new Bitmap(1536, 1536));
Graphics G1 = Graphics.FromImage(new Bitmap(1536, 1536));
private void Form1_Load(object sender, EventArgs e)
{
G.DrawRectangle(Pens.Red, 0, 0, 100, 100);
G1.DrawRectangle(Pens.Blue, 50, 50, 100, 100);
}
now what i want that if i click on a button then G and G1 should merge with an image, so i tried to code it like this, but i stuck in it that how to merge:
Bitmap b = new Bitmap(Properties.Resources.myimage);
---what to write here---
pictureBox1.Image = b;
i read this article
its merging images not Graphics
so any idea mates ?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
You can't merge graphics objects, you can merge images. You can draw the second image on top of the first and make it semi transparent.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Yeah, don't use Graphics g = Graphics.FromImage(new Bitmap())
Have two images, and two graphics objects, draw onto the images, dispose of the graphics objects like you should, and when you want to merge the two draw one image ontop of the other or whatever:
Bitmap ImageOne = new Bitmap(1536, 1536);
Bitmap ImageTwo = new Bitmap(1536, 1536);
private void Form1_Load(object sender, EventArgs e)
{
Graphics g = Graphics.FromImage(ImageOne);
g.DrawRectangle(Pens.Red, 0, 0, 100, 100);
g.Dispose();
g = Graphics.FromImage(ImageTwo);
g.DrawRectangle(Pens.Blue, 50, 50, 100, 100);
g.Dispose();
}
...
Bitmap b = new Bitmap(Properties.Resources.myimage);
Graphics g = Graphics.FromImage(b);
g.DrawImage(ImageOne);
g.DrawImage(ImageTwo);
g.Dispose();
pictureBox1.Image = b;
Of course you'll need to set a transparent colour for your images, otherwise one will just cover up the other.
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
yeaht thats what i thought but didnt know that i can make transparent too
thanks
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
You can also use the ImageAttributes class, which an overload of DrawBitmap will take, to specify transparency, overall, or a range of colors to use for the mask.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have setup a DataView to read hundreds of DataTables multi or single dimensions. I now wish to be able to change data in selected columns using text boxes a search phrase and column, and also an update phrase and column (see below). The question, how do I tie the columns to the DataTable showing in the DataView.
strDataTableName and dimensions come from comboBoxes.
switch (strDataTableName)
{
case "strA":
{
DataView dvTP = new DataView(dsCS.dsI[dim].A);
dataGridViewVariables.DataSource = dvA;
this.Refresh();
break;
}
}
private void buttonUpdate_Click()
{
String strSearchPhrase = textBoxSearchPhrase.Text;
String strSearchColumn = textBoxSearchColumn.Text;
String strUpdatePhrase = textBoxUpdatePhrase.Text;
String strUpdateColumn = textBoxUpdateColumn.Text;
}
I would appreciate any help.
Michael
|
|
|
|
|
I wrote an XML file using the following code:
XmlWriterSettings settings = new XmlWriterSettings();
settings.Indent = true;
settings.IndentChars = "\t";
settings.NewLineOnAttributes = true;
settings.Encoding = Encoding.Unicode;
XmlWriter writer = XmlWriter.Create(String.Concat(Application.StartupPath, "\\Contest Organizer.xml"), settings);
writer.WriteStartElement("Settings");
writer.WriteElementString("Topmost", checkBox_topmost.Checked.ToString());
writer.WriteElementString("StandardTab", checkBox_standardtab.Checked.ToString());
writer.WriteElementString("FormBorder", checkBox_formBorder.Checked.ToString());
writer.WriteElementString("RowHeight", nUD_rowHeight.Value.ToString());
writer.WriteElementString("Formula", textBox_formula.Text);
writer.WriteElementString("Precision", nUD_precision.Value.ToString());
writer.WriteEndElement();
Then I referenced msdn (http://msdn.microsoft.com/en-ca/library/ms162529(VS.80).aspx[^]) and tried to read it using the following code:
using(XmlReader reader = XmlReader.Create(String.Concat(Application.StartupPath, "\\Contest Organizer.xml")))
{
reader.ReadToFollowing("Precision");
checkBox_topmost.Checked = reader.ReadElementContentAsBoolean("Topmost", "");
}
However, this generated an error. What is the proper way of reading?
Thanks in advance.
|
|
|
|