
fguihen
Avatar/Signature-
Posts
251 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by fguihen
-
cannot connect to sqlServer : need a "trusted connection"
fguihen replied to fguihen's topic in Database / XML / Reporting
ok. ive found out how to log on with "sa" username in the connection string. i changed the authentication type from windows login to sql server authentication. i have my own name in sql server as a user also. the sa is of the type "standard ". my name is of the "windows user" type, and this seems to be stopping me form being able to use my name to connect to sql server through an application. any ideas on how i might fix this? also my server is known as "FINTANSPC", which is the name of my pc. how do i set it so that i refer to the server as "LOCALHOST" in the connection string?my current connection string is: string connString = @"server=FINTANSPC; uid=sa; pwd=; database=northwind"; -
i have installed sql Server 2000 and im trying to connect to a database with the connection string string connString = @"server=FINTANSPC; uid=sa; pwd=; database=northwind"; it wont work, so i tried string connString = @"server=localhost; uid=sa; pwd=; database=northwind"; on the first it says "login failed for user 'sa'. Reason: not associated with a trusted sql server connection. on the second connection string i am told the sql server doesnt exist. how come i cant connect using either string? should the localhost not return the same as the other server name, as they are both the same? (by the way, the name of my pc on my little home network is FINTANSPC)
-
hi all. starting to investigate these web services. i have the simple hello world service created. its deployed to IIS. when i try to telnet "telnet localhost 80" thats fine. i set the local echo so that i can see whats going on. i try to use HTTP GET like this: "GET /WebService1/Service1.asmx/HelloWorld HTTP/1.1" it says this is an invalid command. im going mad. i have checked spelling mistakes, and loads of stuff and i cant telnet my service. any ideas? heres the service. not much i know: public class Service1 : System.Web.Services.WebService { public Service1() { InitializeComponent(); } [WebMethod] public string HelloWorld() { return "Hello World" ; } }
-
good book to learn about sql server 2000
fguihen replied to fguihen's topic in Database / XML / Reporting
a general overview, but that still goes into depth on the whole thing. most of th ebooks i have seen dont give too much detail on writing transactions and triggers.id like something to give me a few more pointers on these topics -
i need to get very aquainted with sql server, and i need a good book. there are many availiable, so was hoping someone here could narrow down my list of choices. thanks
-
discountable time is a global time span variable that stores the total processing time of each bot and takes it away, so that bot 12 will not have the extra time spent processing bot1 -> bot 11 added to its time, making it inacurate
-
i had tried and thats why i was posting. i was taking two timestamps, one at the beginning of a method and the other at the end. i would take them away to see the time taken for the method to execute, and even though quite a lot of processing went on in the method, the result was always (0,0,0,0). this is why i think that i have the wrong idea of how it works
-
you know where in task manager you can set the priority of a thread, so it gets max cpu time, well is there any way to do that in c# code to make my app top priority??
-
im sorry for not checking back sooner. i found out what was wrong. i was calling a paint method from within a paint method ( i dont know why) but this was causing the exception. sorry for bothering you
-
i have a method, and i take a time span at the beginning and the same at the end, and take them away, and i should be able to see how long a method takes to do its stuff, but in the miliseconds and ticks both come up as zero at the end. why is this? heres the code. public void DrawToScreen(Graphics h) { this.GetStartTime(); this.processingStart = System.DateTime.Now; pen.Color = Color.Black; System.Drawing.Font f = new System.Drawing.Font("Arial",8); h.FillEllipse(new SolidBrush(Color.HotPink),(float)position.Xval,(float)position.Yval,diameter,diameter); Vector v = new Vector(this.position.Xval,this.position.Yval); v = this.position.Displace(60,8); h.DrawString(this.idNum.ToString(),f,new SolidBrush(Color.Black),(float)v.Xval,(float)v.Yval); if(this.ShowLines == true) { h.DrawLine(this.pen,(float)this.LeftSight.Xval,(float)this.LeftSight.Yval,(float)LeftSightEnd.Xval,(float)LeftSightEnd.Yval); h.DrawLine(this.pen,(float)this.RightSight.Xval,(float)this.RightSight.Yval,(float)RightSightEnd.Xval,(float)RightSightEnd.Yval); h.DrawLine(this.pen,(float)this.RightSight.Xval,(float)this.RightSight.Yval,(float)this.LeftSight.Xval,(float)this.LeftSight.Yval); h.DrawLine(this.pen,(float)this.center.Xval,(float)center.Yval,(float)FarSight.Xval,(float)FarSight.Yval); h.FillEllipse(new SolidBrush(Color.Red),(float)center.Xval,(float)center.Yval,4,4); } //just have thrown in variables to see contents of second, milisecond and tick //parts of the timespan before and after this.UpdatePos(); this.processingFinish = System.DateTime.Now; int secs = Person.DiscountableTime.Seconds; float milli = Person.DiscountableTime.Milliseconds; long ticks = Person.DiscountableTime.Ticks; Person.DiscountableTime = DiscountableTime.Add((processingFinish.Subtract(processingStart))); int secs1 = Person.DiscountableTime.Seconds; float milli1 = Person.DiscountableTime.Milliseconds; long ticks1 = Person.DiscountableTime.Ticks; }
-
if i have timeSpan a = 12,10,20,450 (as in hours , minutes, seconds, milliseconds) and i take another timespan a few seconds later which gives me time span c = (12,10,22,234), and i us c.Subtract(a), will i get (0,0,2,216)?? im a bit unsure as to how timespan works.
-
im getting this error: An unhandled exception of type 'System.InvalidOperationException' occurred in system.windows.forms.dll Additional information: Collection was modified; enumeration operation may not execute. i have no controls on the forum. i have overriden the onPaint method and the OnPaintBackground method. in my own paint method im drawing a simulation to the screen. i have bots, to which i pass a graphics object and draw them. each time they move, i invalidate the form and redraw. when they start moving too much, i get the error above. any ideas?
-
i am trying to place a label on a GDI circle, and move it along the screen on the circle. the circle is a graphical representation of a person. here is how i create a label for each person: lab = new Label[People.Count]; foreach(Person p in People) { p.People = this.People; int sad = this.People.IndexOf(p); //labels[People.IndexOf(p)] = new Label(); lab[People.IndexOf(p)] = new Label(); } when i update the circles position, i draw the label like this: foreach(Person p in People) { p.update(); p.DrawToScreen(f.Graphics); // Label label = (Label)labels[People.IndexOf(p)-1]; // label.Location = new System.Drawing.Point((int)p.position.Xval,(int)p.position.Yval); // label.Text = p.idNum.ToString(); //p.UpdatePos(); Label label = (Label)lab[People.IndexOf(p)]; label.Location = new System.Drawing.Point((int)p.position.Xval,(int)p.position.Yval); float size = label.Font.Size; label.Text = p.idNum.ToString(); label.Text = "test"; label.Show(); label.Refresh(); } this.Invalidate(); my problem is that the label never shows up on screen. any suggestions?
-
ive never multithreaded an app before. i have a bot class. this bot is supposed to navigate its way through a corridor. the corridor is drawn onto a forum. all the bots are created on the forum, given various parameters, added to an arraylist, and their processing methods are called through a loop. im trying to time the duration of processing for each bot, but the last bot always has the accumulated time for all bots. if i multithread i imagine i could get rid of this. can anyone explain how i might go about this?
-
im trying to time how much processing a method of my application does. as soon as the method executes , i have a time span : this.processingStart = System.DateTime.Now;// start of processing duration i have the same at the end of the method. i simply take the start time from the finish time, and i should get the total time taken , but i always get 0. i have a line like: TimeSpan timetaken = processingFinish.Subtract(processingStart); int time = timeTaken.InMiliseconds(); is there something up with timespans that cause this, or can anyone tell me a reason why this is happening?
-
i could do that, but i want to make a graph of the data so it would be better if i could export it to an excel speadsheet.
-
i will be throwing the data out to an excel spreadsheet , when i find out how to do that
-
i have a simulation running. each time the simulation cycles, data is collected. things like, startPosition, Duration, CollisionCount,EndPosition, CycleNumber.... i was going to store theese in an arrayList, but it seems inadiquate for the job. is there any other data storage type that might be better? ive been glancing at hash tables,but as of yet, im not fully sure if they suit.
-
i have a simulation running and in this i collect a lot of information. i want to save all this information in an excel document for analysis at a later date. how do i do this from within a c# application?
-
if i have something like this: foreach(object o in objects) { foreach(object p in objects1) { break; } } will the break break out of both loops or just the inside one?
-
i have looked at operator overloading, and can find out how to overload everything except the = operator. i have my own vector class, which has an x and a y co ordinate. rather than going v1.x = v2.x; v1.y = v2.y; id rather be able to do this: v1 = v2; any ideas?
-
yea, i was down the directX road and it caused more problems than solutions. il give that site a look. thanks.
-
i have an app that draws a lot to the screen. each time the paint() method is triggered, a load of mathsy stuff is done, and everything is redrawn to the screen. this is playing havoc with the processor, and the animation is kind of slow as the redraw takes so long, are there any commands in .NET, using c# where i can keep the processor for one task and deligate other computations to the math co-processor or the Graphics card( it being a graphics app?)
-
i have an arraylist of a vector object that i creted myself. I am adding new vectors to this list, but i want to check if they are in the list already. they are supposed to be compared on the x and y co-ordinates of the vector. if i override the Equals method of the vector class , as shown below, will i be able to use the arraylist.Contains to see if the arraylist contains the vector about to be put into it? public override bool Equals(object obj) { //return base.Equals (obj); Vector v = (Vector)obj; if(this.Xval == v.Xval && this.Yval == v.Yval) { return true; } return false; }