|
Hi Guys,
I cant find any section for Biztalk server in the Code Project.
Is it not relevant here?
Or should we have it?
I strongly believe that we should have a section for Biztalk so that we can share Biztalk related project samples and information.
Thanks
Firoz Ozma
..:: firozOzman ::..
http://spaces.msn.com/members/firozozman/
|
|
|
|
|
i m very bad in c# programming
can anyone tell me good websites or books to learn c# programming.
plzzzzzzzzz its very urgenttt
|
|
|
|
|
lucky1234560 wrote: can anyone tell me good websites or books to learn c# programming.
This one!
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
|
Has anyone had to find the virtual application root inside a javascript? I'm having some trouble with it. In the past, we have been able to use:
var spellURL = "../CommonPages/SpellCheck.aspx";
inside our spell.js script. But we recently added a new level of subdirectories. So SOMETIMES we need another "../" in order for js to find the aspx page. So instead of trying to use relative paths, does anyone know the js equal of "~"??
fyi - i didn't design the new level of directories. That was PJ (Pre-Jessica)
Thanks, Jessica
|
|
|
|
|
FYI - ended up using
/AppName/CommonPages/SpellCheck.aspx
Thanks, Jessica
|
|
|
|
|
I have this as part of building an array of pictureBoxes:
excuse the .<. below because without the .'s the rest of the line was cut off
for (i=0; i.<.MaxPics; i++)
{
ACTHumbBox[i] = new PictureBox();
...
ACThumbBox[i].MouseClick += new MouseEventHandler(ACThumbBox_MouseDown);
...
}
private void ACThumbBox(object sender, MouseEventArgs e)
{
blah blah blah
}
How can I determine which pictureBox triggered the event?
-- modified at 14:56 Thursday 25th May, 2006
|
|
|
|
|
private void ACThumbBox(object sender, MouseEventArgs e)
{
for (i = 0; i < ACTHumbBox.Length; i++)
{
if (ACTHumbBox[i] == (PictureBox) sender)
{
//... Found clicked picture box
break;
}
}
}
|
|
|
|
|
Thanks a lot - just what I needed.
|
|
|
|
|
From a quote:
"C# is a simple, modern, object
oriented, and type-safe programming
language derived from C and C++. C#
(pronounced "C sharp") is firmly planted
in the C and C++ family tree of
languages, and will immediately be
familiar to C and C++ programmers. C#
aims to combine the high productivity of
Visual Basic and the raw power of C++."
If C# is a simpler version of C and C++, shouldn't it be called C Dull?
Maybe the VB portion redeems it from the doldrums...?
Just wondering.
Take Care
God Bless... Feedscrn
+------------------------------+
| The screen is hungry, Feed It! |
+------------------------------+
|
|
|
|
|
Are you just trying to ruffle feathers? What is the point of this posting?
feedscrn wrote: Maybe the VB portion redeems it from the doldrums...?
'Maybe' being the imperative word.
Josh
|
|
|
|
|
After reading more.. C# really is not connected to C++ in any way. So many things in programming are either built onto C++ or the C++ name... using the popularity of C++ to its advantage (and confusing C++ programmers at the same time).
Take Care
God Bless... Feedscrn
+------------------------------+
| The screen is hungry, Feed It! |
+------------------------------+
|
|
|
|
|
Hello,
I am using the following piece of code to save data to my database:
<br />
SqlDateTime date = DateTime.Now; <br />
SqlCommand myCommand2 = new SqlCommand("INSERT INTO orders (date,customerid,productid,sum) VALUES ('" + date + "'," + index + ",'" + productid + "','" + aantal + "')", connect); <br />
myCommand2.ExecuteScalar();<br />
the date-field in the database has the property datetime.
When i try to run the query, he always gives following error:
<br />
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.rnThe statement has been terminated.<br />
I tried to use DateTime.Now directly in the query, but it still gives the same error, also writing a date by hand (in the values-field in the query) gives an error.
When I write a date (exactly the same format as the one above) directly in the database (without a query), i have no errors what so ever.
Can somebody help?
Thanks!
|
|
|
|
|
Have you had a look at at the actual SQL string produced by your string concatenation? I'm guessing there's a format mismatch, maybe due to some regional settings or something. (Often a problem when putting datetimes into the db like this.)
A safe and easy way to fix this would be to use parameters in your SQL query:
string query = @"
INSERT INTO orders (date,customerid,productid,sum)
VALUES (@date, @customerid, @sum)
";
SqlCommand cmd = new SqlCommand(query, con);
cmd.Parameters.Add("@date", DateTime.Now);
cmd.Parameters.Add("@customerid", customerid);
cmd.Parameters.Add("@sum", sum);
cmd.ExecuteNonScalar();
|
|
|
|
|
Thanks, that solved my problem!
|
|
|
|
|
SqlServer likes to see a char dates in a specfic format. You will have to experiment a little but from memory it likes:
01/01/98
OR
01/01/98 23:59:59.999
It is not very tolerant with other formats.
Try date.ToString("dd/MM/yyyy HH:mm:ss.000") in place of date
BTW: I normally let the SQL Server set a DateTime stamp by using GetDate() in place of '" + date + "' . It will usually have a more accruate time then a workstation (at least it will be a common clock). There is also GetUTCDate() for when your users are in different time zones.
|
|
|
|
|
Michael Potter wrote: Try date.ToString("dd/MM/yyyy HH:mm:ss.000") in place of date
date.ToString("s"); works for me as well. This put a "T" between the date and the time, but that seems to be accepted by MySQL in my case.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I have written a function called MyFunction() in a class library called TestClassLibrary. Now supppose that at design time a user creates an object of this class and presses dot(.) with the object to view the related functions, properties etc in the auto context menu. I want that whenever the user selects MyFunction() in that auto context menu, a little description of MyFunction() is displayed as tooltip as it appears with the built in functions. How to do that?
Thanks in advance
|
|
|
|
|
You need to apply a 'Description' attribute to the function. Here is an example:
[Description("Override this method if anything needs to be saved other than the ActivePanel.")]
public virtual bool CanClose()
{
if (this.ActivePanel != null)
return ActivePanel.CanClose();
else
return true;
}
|
|
|
|
|
You don't need to use the Description attribute, as mentioned in the other reply. That attribute will provide the text shown in the property grid for a property. What you are looking for is XML comments. Use the triple-slash comments on your method. Then:
1)Open the Property Pages for your class library project in Visual Studio.
2) Click 'Configuration Properties' and then 'Build' in the TreeView on the left.
3) You'll see under the 'Outputs' section a property called 'XML Documentation File'. Set that value to <AssemblyName>.xml (where AssemblyName is the name of the assembly). For example, if your assembly is foo.dll then call your XML file foo.xml
That will cause your XML comments to be included in an output file generated every time you build. Consumers of your DLL should put that XML file in the same directory which contains the DLL, so that while using your types they'll get IntelliSense w/ your comments.
Josh
|
|
|
|
|
That's good to know. Curious though ... using the Description attribute has worked for me in the past ...
|
|
|
|
|
I learned something new, too. I never knew that the Description attribute was used by Visual Studio's code editor. I wonder if there is a way to express parameter-level information using attributes, instead of triple-slash comments. That would be handy for creating thoroughly self-describing components.
Thanks for the info
Josh
|
|
|
|
|
I have a loop in which I'm populating a form. I try to click a button called "Abort" to terminate the loop but I can't until the loop ends by itself. How can I fix this?
|
|
|
|
|
|
Background:
I'm taking a query from an Oracle Database into a DataSet. Then taking a query from an SQL Database into another Dataset. Merging the 2 datasets, and running the DataAdapter Update. The goal is to keep the Oracle and SQL database tables in sync, and to know what (if any) rows get added/deleted/modified. The issue I'm having is, the Update will update ALL the rows with the same information, or none of the rows even if there are changes. Some additional info, the Oracle Table and the SQL Table don't exactly match, but the Keyed fields are the same (the SQL table has some custom added flags and such). When I do the select, I ONLY select the like fields, in the correct order, and cast the Oracle column Names to be like the SQL column names.
<br />
SqlDataAdapter regionDa = new SqlDataAdapter(regionSql, _sConn);<br />
DataSet regionDs = new DataSet();<br />
<br />
regionDa.UpdateCommand = updCmd;<br />
regionDa.InsertCommand = insCmd;<br />
<br />
OracleDataAdapter oDa = new OracleDataAdapter(oSql, _oConn);<br />
DataSet oDs1 = new DataSet();<br />
<br />
regionDa.Fill(regionDs);<br />
oDa.Fill(oDs1);<br />
<br />
regionDa.FillSchema(oDs1, SchemaType.Source);<br />
regionDa.FillSchema(regionDs, SchemaType.Source);<br />
<br />
regionDs.Merge(oDs1);<br />
<br />
regionDa.Update(regionDs, regionDs.Tables[0].TableName);<br />
Any help would be greatly appreciated.
Thanks!
Scott
|
|
|
|