|
That is because the time format isn't converted to string.
Try this:
SqlCommand dataCommand = new SqlCommand(string.Format("Insert INTO table1 (Text,Datum) VALUES ('Info',{0})",TimeForTheDatabase),dataConnection);
|
|
|
|
|
No, never do that. Use parameters.
|
|
|
|
|
Not really recommended - firstly beacause it involves an unnecessary string conversion, and secondly because it is better practise to use parameters at all times. In this case there is no risk of an SQL injection attack, but all it would take is a small change to the logic...
See the XKCD cartoon "Bobby Tables"[^]
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
Yes, for those reasons, plus performance in a loop:
If you concatenate SQL strings to insert a million such rows the server has to prepare a million SQL statements, but by using a parameterized statement the server prepares the statement once and uses the cached execution plan a million times (at least in theory).
|
|
|
|
|
Hi all i try make an injection into a Game .
some peaple draw menu in a lot of games mmorpg or fps like counterstrike.
i find this stuff kinda cool also for thing like customise windows application or change games interface let say turn ffxi interface into wow interface etc...
now i don't realy understand how peaple do that.
at first i though they inject an exe into the game process but look like its impossible.
so if peaple only inject a dll how they can draw menu? does the code of the dll draw it self a menu into game?
or maybe the dll load an exe into the games?
if someone can point me in the rigth direction from ground for built a simple menu into a games?
i realise i need c++ over c# not sure also.
|
|
|
|
|
evangile wrote: at first i though they inject an exe into the game process but look like its impossible.
Even forbidden, and you agreed not to when you first logged into Wow. As I remember, the agreement is shown after every update, usually on Wednesday.
Wow has a *damn cool* plugin system, can be extended over C#, and there's a coding4fun-article on building your own;
TweetCraft[^]
The way that a plugin is formed, varies from application to application though.
I are Troll
|
|
|
|
|
so to eddy you know blizard agreement worth nothing?
they actualy more than happy peaple developping private server so they have a cool demo version.
+ they have mass arangement with rmt.so they not realy care time peaple talk about wow they happy with dollard.
ffxi is way differente about that they have 0 tolerance but just for some helper application.
|
|
|
|
|
evangile wrote: so to eddy you know blizard agreement worth nothing?
They have the right to block you if you violate the agreement. I know that they will from personal experience
The coding4fun article using C# wouldn't be a violation though, the interfaces are defined just as the plugin-system expects it. Injecting things in another way could be seen as an attempt to hack the system (e.g., someone who tries to change the amount of money that's stored in memory; such a thing is impossible to do, but they *can* detect attempts)
Creating a mining-bot will get you in the same trouble, after some weeks. And why would you even want to, if there's a ready-to-run example in C# that you can customize to your own needs? They even explain how to make a Wow-like interface-window for your Tweets
I are Troll
|
|
|
|
|
You most definately need C++ for a task like this, and a program like this usually is comprised of two portions. The first is a DLL which your code that effects the game lays in, and the second program is an injector which will inject your dll into the game process.
|
|
|
|
|
i know wow have premade plugin for developpe quick but i need learn more than i need build a plugin for wow realy.
for the other respons yes i understand the principe of injecting a dll.
i can even prolly do a something where the charactere will clap his hand in game fast lol.
what i don't d=get is how from an injected dll you can draw a menu or bouton in the game itself.
let say i want a button "Clap your hand".
possible to draw menu from dll realy?
|
|
|
|
|
You could probably create a macro for that, no need to inject code.
|
|
|
|
|
>< it was just an exemple lol that long time i build XPbot and that kind of stuff now i just turn into some official feature kinda.
and have the need to draw in game.
|
|
|
|
|
Hi
I have one Generic List how to convert the list into data table?. Any one help me please?.
Regards
Kesavan
kesavan
|
|
|
|
|
AFAIK there is only the long way - loop through the list and add each item
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
I don't really know why you need it. In many cases is better to loop throght the items and execute the query directly.
But:
You can generate a common code that:
Uses Reflection to discover the properties/fields of the classes.
Be able to map the fields to the columns with the same name or, to create such columns in the datatable (that depends on your need).
Then, loop at each item adding a row and loop for each field/property setting the right column value.
|
|
|
|
|
CSLA has/had a class called ObjectAdaptor that was designed to do what you want.
|
|
|
|
|
What type of list?
For list of int you can do it like this:
List<int> myList = new List<int>(100);
for (int i = 1; 1 <= 50; i++)
{
myList.Add(i);
}
DataTable dt = new DataTable("MyTbl");
dt.Columns.Add("MyColumn", Type.GetType("System.Int32"));
for (int j = 0; j < myList.Count; j++)
{
dt.Rows.Add(myList[j]);
}
|
|
|
|
|
Hiiiiiiiiiiiiiiiiiiii allllllll
I need helping of coding how i can chicking the occourance of congestion at net., and implement the congestion avoidance algorithms
|
|
|
|
|
Gooooooooooooooooooooooooooooooooooood!
Whaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaat haaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaave yooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooou triiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiied?
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
I don't understand what do u mean at all................
|
|
|
|
|
what have you tried?
It would help to know what you tried.
People aren't going to write you the code here.
They'll help you figure out where you went wrong once you have done a bonafide attempt, but trying to just ask for what to do is frowned on.
|
|
|
|
|
3bood.ghzawi wrote: congestion
do you mean collision?
try entering some keywords in the Google search box.
|
|
|
|
|
Hi all...........
I'm asking of how i can implement an IPsec. operation using C#...............
With my regards for all............
|
|
|
|
|
I suggest you use your keyboard for entering meaningful questions, not series of periods.
I doubt someone is going to correctly guess what it is you want.
|
|
|
|
|
hi
i am converting onedatabase file into txt file. This file containing some character like squre box and junk character like this
דךח0ח דךח3חדךח2חדךח=חדךח<חדךח?ח
if its a font(problem) or conversion problem
|
|
|
|