|
Since all of the .Net versions are merely extensions of prior versions, you don't have to wrorry about it. What you DO have to worry about is using framework objects/methods that become deprecated, because evetually, these objects/methods will be removed from .Net, and your app will refuse to work. What tis means is that you should probably update your tools to the newest versions, and rebuuild your app with the newest version of .Net.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
|
Is this a WPF app? WPF uses URIs everywhere.
But anyways, somewhere you are specifying a URI in the wrong format. Or the control is. Did you try turn on all first chance exceptions? That might help you catch it when its really happening.
|
|
|
|
|
Thanks for the reply. It turns out it was getting into an unexpected part of the code after the Invoke (), so I have to dig deeper.
|
|
|
|
|
when you want to close the thread, rather than remove the question and leave a messy thread, I would suggest you just append "[solved]" or "[closed]" to its subject line.
TIA.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
|
i have a script in mql4 language in metatrader software that run this url:
http:
i want to insert this parameters('s' and 'd')in database.
so i build a webservice and a 'Default.asmx' page in visual studio.
what code i should write for inserting these in database?
Regards
modified on Wednesday, January 12, 2011 1:33 AM
|
|
|
|
|
roebuck-code wrote: what code i should write for inserting these in database?
An insert statement. Beyond that, I can't help as this is far too vague. We don't know what database, what version of the .NET runtime, etc, that you are using. One thing though - ensure it's not open to a SQL Injection attack.
|
|
|
|
|
Pete O'Hanlon wrote: We don't know what database, what version of the .NET runtime, etc, that you are using.
data base is sql2000.Visual Studio 2005
do i write a method(methodname) in "Default.asmx" page that get parameters from url and insert these to database?
|
|
|
|
|
If it's an asmx file, then it should be a web service, so you would write a WebMethod in there. Have a read up on traditional web services in .NET to see what you need to do.
|
|
|
|
|
like this?:
[WebMethod]
public void zakhire(string s,string d)
{
string sql = " insert into FX_Forecast2 (Symbol,A) values( '"+s+"','"+d+"')";
OpenDb();
cmd = new SqlCommand(sql, con);
cmd.ExecuteNonQuery();
con.Close();
}
do with writing this code and loading this url(http://aaaa.com/Default.asmx/zakhire?Symbol=+S+&A=+d;) these value will insert in database?
how can i run this url for test in visual studio?(not in mql4)
modified on Monday, January 17, 2011 2:07 AM
|
|
|
|
|
|
Is there a missing " at the end of that line?
|
|
|
|
|
viaducting wrote: Is there a missing " at the end of that line?
ops..thnQ..I correct it
|
|
|
|
|
|
Manfred R. Bihy wrote: Is this a repost of this?
no,i think my programming in that post is wrong..
this question is before that method happen.
|
|
|
|
|
Thats a good way to get hacked by a first grader who read up on SQL injection.
|
|
|
|
|
I found the answer:
with Going to web.config and adding this code in system.web section:
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
good luck.
|
|
|
|
|
Hi all,
I want to derive a class from LinkedListNode<t> so that the nodes themselves contain the data values, but cannot as the class is sealed - any reason why this should be so? If I create a standard LinkedList of classes, the classes themselves do not know about the Next and Previous nodes, because the value of each node is stored in LinkedListNode<T>.Value.
Do I need to write my own doubly-linked list to achieve this or can this limitation be overcome? I suspect I'm probably missing something obvious!
|
|
|
|
|
viaducting wrote: any reason why this should be so?
There are probably plenty of reasons the team who created this marked it as sealed. Ask them.
LinkedListNode is just a pointer to the node within the LinkedList, which, as it is a generic collection, can contain any validate object. You don't need to extend LinkedListNode or create your own LinkedList implementation.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Under the existing implementation only a LinkedListNode can be used to walk along the list. The data within it cannot access the Next and Previous links. I want to store data that needs to access the adjacent nodes, so I don't think the standard implementation will work unmodified.
|
|
|
|
|
I see two ways for you:
1.
use LinkedListNode as intended, and provide a backlink from your actual node data to the LinkedListNode it belongs to.
2.
roll your own linked list. It isn't that hard.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
modified on Tuesday, January 11, 2011 9:33 AM
|
|
|
|
|
1. Is the way I am heading via an overloaded LinkedList where all the Add... functions will set this up automatically.
2. I know it isn't hard but I was trying to avoid doing it!
|
|
|
|
|
viaducting wrote: If I create a standard LinkedList of classes, the classes themselves do not know about the Next and Previous nodes
And usually they should not. For example, if I want a LinkedList<invoice>, the Invoice objects I put into the list do not have to know anything about next or previous, this information has nothing to do with Invoice type. Other way, if I created a single Invoce, what would be supposed to be the values of Next and Previous? Should it create a complete linked list for just opening one?
viaducting wrote: Do I need to write my own doubly-linked list to achieve this or can this limitation be overcome?
I don't think it is a limitation. It is a well designed class for a LinkedList. If you need something special, I guess you will have to make a new class, but I'm afraid I cannot give you any further help unless you give us a little more information of what you need to do.
|
|
|
|
|
You might not need to for a list of invoices, but there are other situations where it would be very useful. For example, if you have a list of points representing a polygon it is useful to be able to access the adjacent nodes so that joints can be re-built if one of the points moves.
|
|
|
|