Xfolder's Q&A profile
.NET Development How to get all the cookies
Hello, I have a problem with getting all the cookies. I use HttpWebRequest and Ethereal shows the following HTTP/1.1 302 Found : Ok . I can't post the url , but this is the code : CookieContainer cookies = new CookieContainer (); ServicePointManager .Expect100Continue = false ; mystr = "action=login&url=%2Fforum&username=myuser&perm=1&password=pass" + "&s=&do=login&forceredirect=1&vb_login_md5password=" ; data = Encoding .Default.GetBytes(mystr); HttpWebRequest wr = ( HttpWebRequest ) WebRequest .Create( "http://www.server.com/login.php" ); wr.Accept = "*/*" ; wr.Referer = "http://www.server.com/forum/" ; wr.ContentLength = data.Length; ...Show All
SQL Server Converting to Windows Authentication? Suggestions, please
I am presently using MS SQL Server 2000; I have an authentication problem for which I do not have a good solution. Here are the main issues related to the problem: Standards mandate we change to use Windows authentication We have an old fat client application that presently works using SQL authentication We have ad hoc and report users that are members of a domain group that has read only privileges in the database The database is a union of 8 distinct databases that all run on the same server There are nearly 1000 stored procedure with a couple hundred of them using references to one of the other 8 databases – a couple hundred cross database procedures All update and record maintenance is performed within the c ...Show All
Visual Studio Express Editions Anyone getting VC# Express working with TestDriven.NET?
Hello everyone! Testdriven.NET is supposed to work with Visual C# Express but after I've installed it theres is no sign of it inside Visual C# Express. Anyone know anything about this Thanks in advance! -Marlun ...Show All
.NET Development Creating class to create bitmap of forms graphics object
I often need to capture a forms drawing surface and write it to a file. Typically I'd create the bitmap then save that and draw it to the forms graphic object but I'd like to do this more generally. Here is some code to create a class to do that but I cannot get to work. The gaphics from g does not transfer to ng and therefore the saved file is blank. class ImageCreator { public void CreateStill(System.IntPtr WinHandle, int w, int h) { Graphics g = Graphics.FromHwnd(WinHandle); Bitmap bmp = new Bitmap(w, h); Graphics ng = Graphics.FromImage(bmp); ng = g; bmp.Save(Application.StartupPath + "\\img.bmp"); } } I'd call it like this: ImageCreator ic = new ImageCreator(); ic.CreateStill(this.handle, this.ClientSize.Width, this.ClientSi ...Show All
Windows Forms How to lock the DateTimePicker
I would like to know how I can lock my datetimepicker control so the user cannot edit it, but not have it all greyed out like it is when the enabled property is set to false. Does anyone know how to do this I found a nice sample that I am using to give the DateTimePicker a ReadOnly property. You might find it useful: http://www.grazioli.ch/Blog/content/binary/ControlsLibrary_src.zip Tony ...Show All
Visual Studio Express Editions sql tables in database
is it possible to get list of tables in database thanks yes.... Public Overrides Function GetSchema(ByVal collectionName As String ) As System . Data . DataTable Member of: System . Data . SqlClient . SqlConnection Summary:Returns schema information for the data source of this System.Data.SqlClient.SqlConnection using the specified string for the schema name.Parameters: collectionName : Specifies the name of the schema to return.Return Values: A System.Data.DataTable that contains schema information. ...Show All
Visual Studio Express Editions Updating listbox items - Must be a simple answer
Hi, I've been trying to write a piece of code that, will update the value of the current .SelectedItem in a listbox. I am using a CheckedListBox and want the ability to edit the text associated with the currently .SelectedItem. This code will not work: clbCategories.SelectedItem = strCategory The value in the Listbox remains unchanged. I'm sure I am missing something really simple. But cannot figure out what it is. All the examples show you accessing the value not setting the value... Cheers, Roy Working from the code above, you may not have to remove the item and add it again. I put it on doubleclick. CheckedListBox1.Items.Item(CheckedListBox1.SelectedIndex) = InputBox( ...Show All
.NET Development How to get information of all the network adapters in a machine?
Hello, could anyone tell me how to get information of all the network adapters in a machine by using "NET Framework 2.0" class (Just like the win32 API GetAdaptersInfo can do) You can use the System.Net.NetworkInformation Namespace. Try IPInterfaceProperties class http://msdn2.microsoft.com/en-us/library/system.net.networkinformation.ipinterfaceproperties.aspx Mariya ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA Framework / Math Library
Okay since I can talk about what the Microsoft guys said at GameFest this might be of interest... The math library that ships with the framework will contain classes for the following mathematical primitives: Vector, Matrix, Quaternion Plane, AABB, Sphere Ray, Frustum, Curve The co-ordinate system is right-handed by default. Pair-wise intersection test are provided for the spatial primitives. There is also something they termed "Movement Helpers" but I'm not sure what they meant by that, perhaps some basic camera controllers Hey XNA4ZX80, if you post this type of info sharing stuff please mark it as a comment as opposed to a question, otherwise something has to be marked as an answ ...Show All
SQL Server Stored Proc for creating and inserting into a table
I am having some trouble populating a table with values from other tables: I am creating the stored proc as follows: CREATE PROCEDURE make_temp_stat (@from datetime, @to datetime) AS DROP TABLE tempTable Create tempTable ( NumApplications (int), NumStudents (int), NumTeachers (int) ) //Then I insert the values into the table as follows INSERT INTO tempTable (NumApplications) SELECT Count(*) FROM [dbo].[CASE_APPLICATION] WHERE (OPEN_DT>= @from AND OPEN_DT <= @to) INSERT INTO tempTable (NumStudents) SELECT Count(*) FROM [dbo].[CASE_STUDENTS] WHERE (APP_DT>= @from_dt AND APP_DT<= @to_dt) INSERT INTO tempTable (NumTeachers) SELECT Count(*) FROM [dbo].[CASE_TEACHER] WHERE (JOIN_DT>=@fro ...Show All
Game Technologies: DirectX, XNA, XACT, etc. ViewPorts - Splitscreen
I am trying to get a splitscreen to work and it does sort of. The problem is the models drawn now look messed up, like the zbuffer is messed up or something. Here is what I'm doing: protected override void Draw(GameTime gameTime) { cameraPosition.Z = 5000; graphics.GraphicsDevice.Viewport = topViewport; Draw(); cameraPosition.Z = -5000; graphics.GraphicsDevice.Viewport = bottomViewport; Draw(); } In the Draw function I am clearing the viewport to CornfolowerBlue and drawing the models. What am I missing here. you have to set your viewport's minDepth and maxDepth according to the values you used in the projection matrix. Like this: viewport.X = 0; viewport.Y = 0; viewport.Width = thi ...Show All
SQL Server OWC, Pivot & "OR" queries
this is probably a very easy question but I can't seem to find an answer... Is there any visual way of building a query in OWC that includes a couple of conditions included as 'OR' basically every dimension I drop becomes a condition but they all get added as 'AND' & I can't seem to have a way to do 'OR' - even cube browser in BI studio doesn't have this option... if it was the same dimension it'd have been easy, but it's a bit complicated since it's a role playing dimension & so even though it's the same hierarchy & same level it becomes 2 different dimensions. something like this: DateOpened.Year = 2000 or LastRenewalDate.Year = 2000 ...Show All
Commerce Server DBStorage failed to load marshall field error
Hello Is it possible to copy items from one commerce site database to another commerce site database i'm getting this error Microsoft.CommerceServer.Runtime.CommerceException: LoadOrder Failed. ---> System.Runtime.InteropServices.COMException (0x80028019): DBStorage failed to load marshall field. The marshall field may be corrupted. at Microsoft.CommerceServer.Interop.Orders.DBStorageClass.GetData(Object vtReserved, Object vtKey) at Microsoft.CommerceServer.Interop.Orders.OrderGroupFreeThreaded.MyLoad(String& ordergroup_id, Object& MyLoadType) at Microsoft.CommerceServer.Interop.Orders.OrderGroupFreeThreaded.LoadOrder(String strOrderGroupID) --- End of inner exception stack trace --- at Microsoft.CommerceS ...Show All
SQL Server Error: unable to retrieve column information from the data source
Hi, I am trying to set up a data flow task. The source is "SQL Command" which is a stored procedure. The proc has a few temp tables that it outputs the final resultset from. When I hit preview in the ole db source editor, I see the right output. When I select the "Columns" tab on the right, the "Available External Column List" is empty. Why don't the column names appear What is the work around to get the column mappings to work b/w source and destination in this scenario. In DTS previously, you could "fool" the package by first compiling the stored procedure with hardcoded column names and dummy values, creating and saving the package and finally changing the procedure back to the actual o ...Show All
Visual Studio Tools for Office Using VSTO 2005 Word with Schema to list Information: SIMPLE LIST
Background: I'm creating Word RESUME template with attached schema, which needs to fill employee data into template. Schema (simple for testing) looks something like this: <Resume> <ConsultantName> <ConsultantTools> <Tool> <ToolName> <YearsUsed> <Tool> where consultanttools is a list of tools each with name and years used. Sample of XML to "import" into resume template: <Resume> <ConsultantName>Vadim<ConsultantName> <ConsultantTools> <Tool> <ToolName>VS 2003<ToolName> <YearsUsed>5<YearsUsed> </Tool> <Tool> <ToolName>SQL 2000<ToolName> <YearsUsed>7& ...Show All
