|
Generally, I'd say if you got no exceptions, then it succeeded. Usually the simple solution is the one that works best.
only two letters away from being an asset
|
|
|
|
|
hi my aim is to close a open socket ....that too perfectly
socket.close() is raising exceptions ..any methods to close it forcefully
its me sid
|
|
|
|
|
This is just a quess, but maybe try doing a socket.Disconnect() first?
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
I have some questions as below :
1.I want to connect to my application which is intalled in another country,
and the clients who work with this app have low speed internet and they are very beginner
now i have this problem that how i can use some apps for connecting to them or how i can
embed such API in my app when user clicks on that it automatically send the its desktop for me
|
|
|
|
|
Google came up with this[^] among others
|
|
|
|
|
|
Are you sure that you wrote that code? It looks like you copied and pasted it from somewhere, without even looking at it. What's the give-away, you may ask?
clife537 wrote: mail.From = "mail@mymail.com";
clife537 wrote: mail.To = "mail@mymail.com";
clife537 wrote: mail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"] = "mail@mymail.com";
clife537 wrote: mail.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"] = "xxxxxxx";
clife537 wrote: SmtpMail.SmtpServer = "smtp.domain.com";
You are supposed to replace all those with actual E-Mail addresses, and your working SMTP server.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
Isn't the MailMessage.To property, read-only? I don't think you can write
clife537 wrote: mail.To = "mail@mymail.com";
It would generate an error.
To add an email address to the MailMessage.To property, you'd have to write something like:
mail.To.Add("someone@somewhere.world");
Ashish
|
|
|
|
|
Hi,
Does anyone know how the get/Pass the DBnull Value of an integer field from a typed dataset without getting an error?
Propertie Allow DBnull is true for my integer field.
Thx
Kurt
|
|
|
|
|
I'm not quite sure I understand your question, but if I understand correctly, DBNull.Value , will give you a null value you can pass.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
hi,
thx for u'r response. (i rather be polite thinking you're invention maybe exists. )
Its a column from a typed dataset, which has no value entered by the user. so the value is DBnull. When getting my value to pass to a stored proc it results in an error.
Typed dataset DataSet1 with Table1 has 3 columns all integers with property allow DBnull
Gives a row Table1Row with fields Table1Row.ID1, Table1Row.ID2, Table1Row.ID3
when calling for example Table1Row.ID2 it gives an error.
In designtime the property Nullvalue also remains (throw exception) and cannot be modified. For string fields it's no problem.
Thx again.
Kurt
|
|
|
|
|
topcatalpha wrote: thx for u'r response. (i rather be polite thinking you're invention maybe exists. )
topcatalpha wrote: When getting my value to pass to a stored proc it results in an error.
What is the error message you are recieving?
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
The error message is :
The value for column 'ID2' in table 'Table1' is DBNull
|
|
|
|
|
Double check that the field ID2 does allow null values, that make sure that there isn't a exception thrown if there is a null value. Additionally, in your code, you can check the value before passing it, and if it is equal to DBNull then set the value to 0 instead of null.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
Found something :
[^]
i need to check each field for null and pass null value myself. Seems very unlogic to me knowning that SQL servers allow DBnull values in tables.
Ex :
<br />
if(Table1Row.IsID2Null())<br />
ATDatabase.AddInParameter(updateCommand, "ID2", DbType.Int32, null);<br />
else<br />
ATDatabase.AddInParameter(updateCommand, "ID2", DbType.Int32, Table1Row.ID2);
Checking the auto generated code from the typed dataset:
[System.Diagnostics.DebuggerNonUserCodeAttribute()]<br />
public long ID2 {<br />
get {<br />
try {<br />
return ((long)(this[this.Table1.ID2Column]));<br />
}<br />
catch (System.InvalidCastException e) {<br />
throw new System.Data.StrongTypingException("The value for column \'ID2\' in table \'Table1\' is DBNull.", e);<br />
}<br />
}<br />
set {<br />
this[this.Table1.ID2Column] = value;<br />
}<br />
}
Cannot pass null value here...
greetz
Kurt
|
|
|
|
|
IIRC a typed dataset generates 2 methods for you:
IsColumnNameNull()
SetColumnNameNull()
|
|
|
|
|
hello,
I'm working on a C# windows application. I've managed a connection with an MS Access Db, but I'm having a problem with retrieving a single cell from a table.
Can someone please post a sample statement of retrieving and converting it to string?
Thanks in advance.
|
|
|
|
|
Have a look into this simple example
Example[^]
|
|
|
|
|
Create a DataTable . Once you have established a connection, use a TableAdapter to fill the DataTable . Once you have done that, it's as simple as getting the data from a DataTable .
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
I've embedded a webbrowser control in a 3rd part application via their plug-in mechanism
The first time I set the documentText property on the webbrowser control nothing happens. The documentText property remains as "/0" and the browser doesn't update. On subsequent attempts when i set the value it works just fine, all updating occurs via the same code.
I found a single posting where someone was experiencing the same issues but no one had much advice.
Has anyone seen this behaviour before?
Thanks
Russell
|
|
|
|
|
Russell Jones wrote: Has anyone seen this behaviour before?
Maybe. Try this rather than setting the documentText property:
browserCtrl.Navigate("about:blank");
led mike
|
|
|
|
|
Thanks mike,
That was one of the things i tried while getting this thing to work. There were a few people who reported that until the page navigated somewhere you couldn't set the document text property. I'd forgotten about that.
At least i now understand that the documenttext won't show the text you set it to until that text is loaded up in the browser so it makes sense that it would still be blank.
Is there a way to force the browser to render the text it's been given?
Russell
|
|
|
|
|
Russell Jones wrote: Is there a way to force the browser to render the text it's been given?
Not exactly sure what you mean by that but this has been working for me for several years now
browserCtrl.Navigate("about:blank");
string sHtml = "<html><body>No Document</body></html>";
Document.Write(sHtml);
This is in a User Control where also:
public HtmlDocument Document { get { return browserCtrl.Document; } }
led mike
|
|
|
|
|
Hello friends
I need help , can anybody help me for geting all child nodes from perticular node. like eg.
<rss version="2.0">
<channel>
<title>Suchbegriffe von Herzel
http://www.andunite.com<description>andUNITE - Suchbegriffe von Herzel
<pubdate> Tue, 5 Feb 2008 12:44:54 GMT
<item>
<title>herz
<description>herz
http://beta.andunite.com/EnterWorkspace.do?type=Searchword§ion=home¶m=6759 <pubdate>10 Jan 2008 09:47:08 GMT
<item>
<title>herz
<description>herz
http://beta.andunite.com/EnterWorkspace.do?type=Searchword§ion=home¶m=6759 <pubdate>10 Jan 2008 09:47:08 GMT
from above file , i want all child node of every item parent node .
can anybody helpe me ??
thanking you advance
regards
ashok
|
|
|
|
|
You have an example on MSDN[^]
SkyWalker
|
|
|
|