|
No, pretty much every post he's made is from a completely ignorant viewpoint.
|
|
|
|
|
Allah has given us C#. Java is an abomination to Allah, a heretic language. Are you rally suggesting that we ignore the progress that He has granted us? Ignore type-safety? Drop the increased productivity?
That sounds like the arrogance that Iblis would display
As Spock would say, "Live long and prosper"
|
|
|
|
|
I created a xsd file using a xml, and then loaded it into a dataset. It created several tables according to the xsd. I notice that each table has a auto-generated column (name ends with ..._id, it looks like the dataset uses these ids to determine the relations between each table).
the problem I am having is that when I fill each table in the dataset with data, then write it out to a xml file, the xml file does not come out in the format defined by xsd, e.g. the child element becomes sibling elment of the parent element
defined in xsd
<parentelement>
<firstelement></firstelement>
</parentelement>
output xml file will become
<parentelement>
</parentelement>
<firstelement>
</firstelement>
When I debug it, I find out that the reason is that in dataset, the auto-generated "parentElement" table's id(key) column is updated automatically(0,1,2...), but the "childElement" table's id column is still empty, therefore cause the two table not to "link" to each other(I found out that by adding child table's id column with 0,1,2.., the xml will come out in the correct format).
I use
adp.fill(ds, "parentElement") and adp.fill(ds, "firstElement") to fill both table, can't figure out why only the parent table's id column is auto-populated not the child one.
Please experts help!!
|
|
|
|
|
It seems that you might have problems with mapping datasets to xml's.
You can find here[^] excellent code snippets, which will lead you to the correct solution.
SkyWalker
|
|
|
|
|
Hi
I have 4 arrays which i want to insert them into 4 columns of a table of my sql server 2000 database, and it should be done at once, not inserting one by one. How can i do this?
|
|
|
|
|
Transactions
http://en.wikipedia.org/wiki/Atomicity_(database_systems)
|
|
|
|
|
Easiest way is to create a stored procedure and pass the data as parameter to server side. This requires only single call to db.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
I have read somewhere that I should use union all like this:
<br />
use myDb<br />
insert into myTable (columnName1,columnName2...)<br />
select row1value1,row1value2...<br />
union all<br />
<br />
select row2value1,row2value2...<br />
union all<br />
.<br />
.<br />
.<br />
but I don't know how pass the arrays to the stored procedure and how perform these in a loop to add all array elements automatically...
|
|
|
|
|
Union is only usable in db when you combine several result sets. You cannot use it to pass arrays from client. I don't remember if you can pass table type parameter in sql server 2000. That would be a solution in your case. It's not automatic so you must program the insert loop inside the procedure.
Another option is to use SqlBulkCopy class. Have a look at that also.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
My teacher now and then says that you should be very restrictive with global variables since they, according to him, are not recommended in object oriented programming.
Still he uses global variables himself. An example is that he creates objects which he refers to with global variables in windows applications.
With this as a background I wonder:
Are global variables really dissuaded in OOP? I am especially interested in knowing if global declaration and initialization of objects, which my teacher does, is OK.
|
|
|
|
|
You should restrict access as much as possible. But if it's not possible to restrict it anymore, than a global object is ok, I'd say.
Of course it's also possible to pass the object to every constructor or function as a parameter.. but this can get really complicated, especially if you notice that you need such an object after already having some code.
|
|
|
|
|
I suggest using a dependecy injection container (Unity Application Block, Castle's Windsor Kernel, Spring.NET). Then you have only one single global variable, the container itself.
All other global variables will make unit testing, decoupling of components and maintenance a great bit more difficult.
Happy coding
Urs
-^-^-^-^-^-^-^-
no risk no funk
|
|
|
|
|
An object-oriented approach to obtaining the functionality of global variables is the Singleton design pattern. http://en.wikipedia.org/wiki/Singleton_pattern[^]
You can even put multiple variables into your Singleton that need global access.
|
|
|
|
|
Hi All,
If I have two lists and one is a subset of the 'main' list what's the quickest/best way to sort the sub list into the same order as the source main list?
Cheers,
|
|
|
|
|
One way could be that you create Comparison(T) method (or create comparer class and implemet IComparer) and use that for sub lists Sort parameter. Instead of comparing which one of the attributes is greater, use your main list to make the decision.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Please Help me, how can i build Software like "Privacy Guard"(its new name is "Hide Your IP Address / Version 1.0") in "C#"
|
|
|
|
|
It's like eating an elephant. You have to do it in small pieces.
|
|
|
|
|
First, catch an elephant...
|
|
|
|
|
Damn, I knew I was missing something important...
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
You need to plan this first.. You have to decide if you want to catch an asian or an african elephant. Then you have to decide which elephant-gun you want to buy. And finally, you have to choose the airline to fly to Asia/Africa.
|
|
|
|
|
African elephants are the only way to go.
I can't take the elephant home on a plane; so I'll have to take a boat.
There are plenty of gently-used elephant guns lying around Africa; I'll pick one (or two) up when I get there; that should make getting through customs easier as well.
|
|
|
|
|
He´s to heavy you will crash or sink! just kill the african elephant!!!
The meat is worthless so take just the ivory, smugle it, you can sell it for a good price in europe.
Take the money and hire a good programmer to do any software you want!!!
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
You can't hide your IP address. It's that simple. If you changed the source address of outbound packets, the server you connect to won't know where to send the return packets back to. That's why you can't do this locally on your PC.
Now, if you had a proxy server, you're automatically hiding your true IP address because you're going through a "man-in-the-middle" proxy server that is making requests for you and returns the result to you. That proxy will always know what your true IP address is. The target server that you are ultimately contacting won't know your IP address, but instead WILL know the IP address of the proxy.
The only thing that's really hiding your IP is the trust in the proxy server that your IP address isn't being recorded in a database somewhere.
|
|
|
|
|
I Very Thankful to you for replying
If i have proxy server so what can i do???
|
|
|
|
|
Give it up. You've been completely missing all the concepts required to understand how thsi works for well over 6 months now. As you've been repeatedly told for months, you need to completely understand how and why TCP/IP works in order to do something like this.
|
|
|
|