JDPeckham's Q&A profile
Visual Studio Tools for Office Update
hi every one, I'm trying to run the benefits registeration example on my machine but I keep getting this error when I try to open the *.doc from IE The customization does not have the required permissions to execute. I tried to republish the BenefitForm incase it was using Absolute Paths. but that did not change anything. I tried uploading a new *.doc but also got the same error Using .Net Framework 2 configuration tool , I gave Full trust to the path \BenifitsRegisteration\CS\BenefitsPortal\Forms\* under user,machine and enterprise but still got the error. From the file system, Double clicking on BenefitForm.Doc at \BenifitsRegisteration\CS\BenefitsPortal\Forms works fine but double clicking on Fit ...Show All
.NET Development returning result of sql query in a string
Hi. I need to create a function in c# that returns the result of a query in a string, so far I have this: public string GetModules(CTP_ID) { string modules DBConnection connection = new DBConnection(); // create the data adapter SqlDataAdapter daMod = new SqlDataAdapter("select count (*) from courses where ctp_id = 'Biannual Update Courses'",connection); -- (all on one line) // create an empty data set DataSet dsMod = new DataSet(); try { connection.Open(); daMod.Fill(dsMod,"connection"); modules = this is where I want the string (modules to be the result of the query) } catch (Exception ex) { lblMessage.Text = ex.Message; } finally { close the connection connection.Clo ...Show All
Game Technologies: DirectX, XNA, XACT, etc. DXUT on shutdown problem
I am trying to use DXUT minimally in my application. I have an app class that is a local member of main(). This class has static wrappers for OnDeviceCreated, OnDeviceLost, OnDeviceReset, OnDeviceDestroy, OnFrameRender, etc that have been linked to DXUT. These static wrappers just cast pUserContext to an instance of my class, then call a real member function to do the work. I also have CD3DSettingsDlg and CDXUTDialogResourceManager as members of my class, so that i can support device selection and adjustment. Everything works fine until i try to close the app. When the main function returns the destructor of my app class is called, causing the destructors of CD3DSettingsDlg and CDXUTDialogResourceManager to be called, and then for some r ...Show All
.NET Development How to decode chunked transfer encoding using HttpWebResponse
Hello All, I'm calling a cgi script that returns a zipped file using the HttpWebRequest class. The web server sends chunked response. Response captured in Fiddler: HTTP/1.1 200 ok Date: Thu, 30 Nov 2006 10:09:47 GMT Server: Apache Set-Cookie: sessionID=1164881387; path=/; expires=Thu, 30-Nov-2006 15:09:47 GMT Transfer-Encoding: chunked Content-Type: text/xml; charset=ISO-8859-1 c13 PK Here's how i process the response byte[] data; response = request.GetResponse() as HttpWebResponse; responseStream = response.GetResponseStream(); reader = new StreamReader(responseStream, Encoding.UTF8); data = Encoding.UTF8.GetBytes(reader.ReadToEnd()); This returns me only the first chunk. How do I read the remaining data thanks, Siwi ...Show All
Windows Forms Keyboard cues problem
Hello , Background: I've got a WinForms app written in C# using .Net 2.0. In this app I have a custom button class: public class ThinButton : Button The reason for having the class is to override the default painting. Specifically I want to draw a thin border and have a narrower margin between the button edge and the button text. This allows me to have a smaller button (to fit into tight places) that still looks good. The Problem: I have noticed that when I press the alt key on the keyboard (when running the app) the accelerator key mnemonics are shown underlined, as they should, for all controls, including my ThinButtons. When I press the alt key again, the mnemonics dissappear, as they should, for some control ...Show All
Windows Networking Development Broadcast address
I need to get the udp/tcp broadcast address for all local transport addresses in the socket's address family. I am not interested in 255.255.255.255. I would like to do a class broadcast. For this I need to figure out the class of the network the adapter is connected to. It would be nice to get the subnet mask of the network but that does not seem to be available. I have found a SIO_GET_BROADCAST_ADDRESS definition in the header files to be used with WSKControlSocket. This returns a not supported error. Is this truly not supported Would this return what I would want Does anyone know how to get the subnet mask for each of the local transport addresses in the socket's address family Thanks, Lou ...Show All
SQL Server Amateur :: Connections
hi to you all... i need some help with SSIS... i need some examples to transfer data from one server to another via web ... can anyone help with this ' thx to all Start with this - build an extract process to pull the data into a flat file, run a FTP process to send the flat file to a new server, and then a load process on the remote server to load the data in the flat file. ...Show All
Internet Explorer Development IE7, OE6 Printing problems with headers
Having an intermittent problem printing To: From: CC: Subject: Attachments: headers on emails. Usually happens with larger emails or emails with large attachments or emails that have been replied to or forwarded from other people. Have installed Generic/text printer and sent the email to this printer but sometimes the headers are still missing even printing this way. I have if I open the offending email and highlight just one or two words in the text of the email eg Dear John and then print the email using my HP printer (not as text on Generic printer) - the headers then print and so does the selected words. Don't suggest using Outlook as often we only print the first page of emails as we already have the rest of the email on file especial ...Show All
Visual Studio Express Editions z-wheel events
Hello, I am developing with Visual C++ 2005 Express Edition and I would like to know how to see z-wheel events of the mouse in order to change the focus of a component on my visual interface. That is to say, I have the focus on Textbox1 and when an z-wheel event come, the focus will pass at the Textbox2. Thank you for help. Best Regards. I assume you mean the scroll wheel. It generates WM_MOUSEWHEEL messages. ...Show All
Visual Basic Limited Intellisense with Sender As System.Object
Used a For Next loop to create a bunch of new buttons at runtime. After creating each button, I added an event handler for it's Click event. However, in the Click event itself, I don't get any intellisense for the Sender parameter. Brief Code below dim x as integer dim y as integer = 30 dim btn as Button for x = 1 to 5 btn = New Button with btn .Name = "Button" & x.ToString 'Set the other Properties End With x += 1 y += 30 AddHandler btn.Click, AddressOf MyButton_Click Me.Controls.Add(btn) next x Private Sub MyButton_Click(ByVal sender as System.Object, _ ByVal, e as SystemEventArgs) MessageBox.Show(sender.Name) ' No intellisense for sender object End sub Being new to this, I depend ...Show All
SQL Server Get week number with changed @@datefirst question
I want to get the week number (according to ISO rule i.e. if most of the working days fall in the JAN set it to as week number 1). I know one stored procedure is available at MSDN to achieve this task. It works fine for me if the @@datefirst is set to 1 (i.e. Monday) but i have a strange requirement of calculating the week number according to ISO rule but the start date of week can be any day for example Saturday. When I try to run that procedure with my unique criteria I get wrong week number for some years Can any one tell me the more generic solution Your help is appreciated thanx I gave a try but found the following problem such as 3 January 1986 2 January 1987 1 January 1988 etc are set to 0 (should be 1 for first ...Show All
Visual Studio HttpWebRequest gives error when run inside vs2005. Works from Windows
I have a Windows XP x64 workstation with a fairly clean install of Visual Studio 2005. I have a problem sending requests using WebRequest/HttpWebRequest. I get this exception: System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A socket operation encountered a dead network at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) --- End of inner exceptio ...Show All
Visual C# ShDocVw.InternetExplorer BeforeNavigate2 event not showing headers
I am using ShDocVW.InternetExplorer to automate a website. I have added the BeforeNavigate2 event so I can look at the page that will be accessed next. In certain situations when I detect that a file download is going to happen, I switch to using HttpWebRequest and HttpResponse to download the file. The problem I have is that when the BeforeNavigate2 event is called the headers parameter is null. I need to get the headers so I can get the cookies that are being sent. Does anyone know why the headers isn't being passed to the BeforeNavigate2 event Is there some other way I can get the cookies associated with the POST being sent to the website Regards Douglas ...Show All
Visual C++ Error in TCHAR
Hi all, I have problem converting TCHAR dbcc_name[1] in VC++ .Net. error C2697: 'dbcc_name' : must explicitly specify __gc or __nogc for an array declared in a managed type Can any one let me know to correct this --------------------------------------------------------------------------------------------- This is from platform SDK typedef struct _DEV_BROADCAST_DEVICEINTERFACE { DWORD dbcc_size ; DWORD dbcc_devicetype ; DWORD dbcc_reserved ; GUID dbcc_classguid ; TCHAR dbcc_name [1]; } DEV_BROADCAST_DEVICEINTERFACE * PDEV_BROADCAST_DEVICEINTERFACE ; --------------------------------------------------------------------------------------------- This is what I converted. __value struct PDEV_BROADCAST_DEV ...Show All
Visual Studio Team System Request clarification on task execution order
Is this the correct task execution order I've run across two references and they're not the same. BeforeEndToEndIteration* BuildNumberOverrideTarget* InitializeEndToEndIteration BeforeClean* CoreClean AfterClean* Clean InitializeBuild BeforeGet* InitializeWorkspace CoreGet AfterGet* PreBuild BeforeCompile* CoreCompile AfterCompile* Compile GetChangeSetsAndUpdateWorkItems PostBuild BeforeTest* CoreTest AfterTest* Test PackageBinaries* TeamBuild BeforeDropBuild* CoreDropBuild CopyLogFiles AfterDropBuild* DropBuild AfterEndToEndIteration* EndToEndIteration THX Curt Zarger I've been doing a lot of things after the CoreComplile task like building VB projects, copying files, and building an install, using targ ...Show All
