Stubey's Q&A profile
SQL Server Howto use COM objects in CLR. NET programs
hi, i have a vb.net progi which i want to run under sql server 2005 as CLR. the prob is that when i want to create the assembly in sql 2005 it says that the create of the Interop.FC_COM.dll (this is the COM interop object) failed. when i try to create the Interop.FC_COM.dll as an assembly in sql 2005 it fails because this dll is not follwing the structure of a CLR dll. i've heard somewhere that MS is not supporting COM objects under CLR directly. is that true any comments welcome, thnx Permission set SAFE EXTERNAL_ACCESS UNSAFE Code Access Security Execute only Execute + access to external resources Unrestricted Programming model restrict ...Show All
Visual C++ is this the correct/best way to set file size?
Hello everyone, I have verified that the following approach works to set the size of a file (newly created file) to be 100 bytes, but I am not sure whether it is the correct/best way to have a maximum portability (I need to write code on both Windows and Linux). Could anyone give me any comments [CODE] #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> #include <io.h> #include <stdio.h> int main() { FILE* file = fopen ("foo123", "w+"); fseek (file, 99, SEEK_SET); fprintf (file, "x"); fclose (file); return 0; } [/CODE] thanks in advance, George Thank you Sam, Sam Hobbs wrote: UNIX and Linux are ...Show All
Visual Studio 2008 (Pre-release) Creating a Message from scratch
Hello, I'm trying to create an Message instance, and I have the following problem: How can I add objects in a easy way to a serializer who writes them in the body of the SOAP envelope ! On other words, What is the standard way to add objects to a SOAP envolope (encapsulated by Message) Thanks, M Hi, what I want to do is the following: Serialize, in the standard way, a list of objects that will be the parameters on a Operation. I want to do this: 1) make a list of objects... 2) serialize them (default xml serializer)... 3) write it to message's body... or get the objects serialized (on a Message's body) on the MessageEncoder.WriteMessage and write them to a buffer in a ...Show All
Visual C# Commandline arguments question
I am starting a process after setting some command line arguments. Is there any way that I can see what actually executed on the command line along with all the arguments that were passed Is this information stored somewhere after the process is started The reason I'm asking is that I am using a companies command line FTP program and I keep getting told that I am using bad command line arguments. The arguments I'm passing are valid, but I want to check to make sure that is actually what is getting executed. Thanks in advance! I've got a question on arguments with process. How would I pass a string type argument I need to pass 3 arguments, 1st argument has is a small message and has spaces in it, ...Show All
Visual C# RegAsm cannot find dependent library when registering a DLL
First, I must admit I have little knowledge about to assemble and install a DLL, but thanks to Visual C# Express, I was able to do some damage. The class library works just fine in the IDE, integrated into a chat program as a plug in, but when I tried to create an installer for it, it croaks on a call to regasm. regasm myplugin.dll error: RegAsm : error RA0000 : Could not load file or assembly 'Interop.OtherLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified This 'Other.dll' is used by my dll to hook into the chat program and it resides in a folder under the chat program that's not on the system path. So, I've tried to put the Other.dll into a folder tha ...Show All
Visual C++ MFC CScrollbar Question.
I'm having some issues with a scrollbar. I can get it displayed and everything, but I can't get any messages. Below is the code. Any ideas // BrowseMissionDlg.cpp : implementation file // #include "stdafx.h" #include "MDAE.h" #include ".\browsemissiondlg.h" // CBrowseMissionDlg dialog IMPLEMENT_DYNAMIC(CBrowseMissionDlg, CDialog) CBrowseMissionDlg::CBrowseMissionDlg(CWnd* pParent /*=NULL*/ ) : CDialog(CBrowseMissionDlg::IDD, pParent) , m_nMaxWindowLines(0) , m_Exit(FALSE) , m_Viewable(FALSE) , m_WindowBuffer(m_DeviceInterface) , m_CurrentRecordOffset(0) { } CBrowseMissionDlg::~CBrowseMissionDlg() { } void CBrowseMissionDlg::DoDataEx ...Show All
Visual Studio 2008 (Pre-release) Streaming with mtomMessageEncoding with readerQuotas, maxBytesPerRead issue
Hello there! I've just found that when streaming is enabled over HTTPS transport, setting <readerQuotas/maxBytesPerRead> for <mtomMessageEncoding> doesn't affect amounts of bytes that can be read from the streamed message. It is always 4096 which is the default value. My binding looks like: <customBinding> <binding name="DataStoreServiceBinding" receiveTimeout="00:30:00" sendTimeout="00:30:00"> <mtomMessageEncoding maxBufferSize="1048576" messageVersion="Soap12WSAddressing10" writeEncoding="UTF-8"> <readerQuotas maxBytesPerRead="524288"/> </mtomMessageE ...Show All
Visual Studio 2008 (Pre-release) How to reference resource when binding.
I have a LinearGradientBrush defined in my resources part of my XAML. I would like to bind the two GradientStops to user settings. How can I reference the stops in my codebehind this.FindName doesn't seem to work. < LinearGradientBrush x:Key = " HighPriorityTaskBrush " StartPoint = " 0.5,0 " EndPoint = " 0.5,1 " > < GradientStop x:Name = " HighPriorityTaskColorStop1 " Color = " sc#1, 1, 0, 0 " Offset = " 0 " /> < GradientStop x:Name = " HighPriorityTaskColorStop2 " Color = " #FFFF7878 " Offset = " 1 " /> </ LinearGradientBrush > bd = new Binding ( "HighPriorityTaskColorStop1&quo ...Show All
Visual Studio Express Editions Update/Edit DataGridView
Hello, I have a DataGridView that is bound to a database. I've been trying to figure out how to get it to update when changes are made but can't seem to find the answer. I tried doing a update query directly on the datagrid but it won't allow me to do that. I tried creating one on the tableadapter as well but can't access from the datagrid properties. Could someone point me in the right direction walkswan 2 different worlds but almost the same if that makes sense. ok.... you are using the wizard and created a TableAdapter. I think in the wizard it will generate an update command for you for the TableAdapter. You simply then get this TableAdapter and call the Update method, giving it the ...Show All
Visual Studio 2008 (Pre-release) how to create a message from scracth?
Hello, I'm writing a MessageEncoder because I'm receiving a non-standard stream and I want to create a message from it's values, so: 1) I 'understand' the parameters of the operation from the stream and use a DataContractSerializer to serialize them to the body of the message... The question is: How do I correctly write the body of the message Because I can write a parameter using the DCS but I can't write the Operation Name, so the dispatcher fails when it tries to resolve the call: OperationFormatter encountered an invalid Message body. Expected to find node type 'Element' with name '[ OperationContract_Name ] ' and namespace '[ ServiceContract_Namespace ]'. Found node type 'Element' with name '[ DataContract_Name ]' and ...Show All
Windows Forms Simple Form customisations
Hi, I'm at the moment learning C# through Visual C# Express edition and have a few questions. My first is that in my custom web browser I am designing how do I alter it, so that after I type my URL in my text box, it makes my browser go to that site as well as being able to press a GO button form. Also how I make it so that when I press Maximize the parts of my form scale to my Maximized window. To me these will seem like silly questions to most of the experienced and knowledgeable programmers on here, but I am only 15 so please be kind! Thanks for the Help. Hi Create KeyDown event to the textbox and test if e.KeyCode == Keys.Enter then do same as you do at GO buttons press. If you want resize/move you components at the s ...Show All
.NET Development Test if a MDB is Corrupted
Hi i need to create a small application that can test if an mdb file is corrupted, how i can make this check Test for this error.... Microsoft JET database Engine error '80004005' Cannot open database ''. it may not be a database that your application recognizes, or the file may be corrupt. ...Show All
Windows Search Technologies #msntb_toolbar_full_name#
I have the following sign come up on the screen. #msntb_toolbar_full_name# is unable to load config file. If you recently upgraded to a newer version of #msntb_toolbar_full_name # and have not restarted your computer since the upgrade,please try resarting your computer.If the problem persist,please reinstall the #msntb_toolbar_full_name#. I'm currently running WXP Home Edition,IE7. W Defender.This problem only occured after I completed system restore two days ago. Thanks to any person who can help. CEEBEE ceebee wrote: I have the following sign come up on the screen. #msntb_toolbar_full_name# is unable to load config file. If you recently upgraded to a newer version of #msnt ...Show All
Windows Forms Setting Datagridview Styles Dynamically
Hi, As part of my learning of VB express I am stuck at the moment on setting the datagridview styles dynamically. I can change the default formatting colours etc but what I would like to do is change the colour of a complete row based upon the value of a given cell within that row. I have in my datagridview a number of rows where one row has a cell with the value 10. I would like to paint this row's background red to highlight it from the rest. I have tried many ways of doing this but without the required result. I have used the .rowprepaint and .rowpostpaint events Any help would be very welcome # Region " Paint the row red for rows that =10" Private Sub DataGridView2_CellFormatting( ByVa ...Show All
.NET Development my debugger doesn t break in the child form that causes the error
Hi, In my MDI form, I show another child form childfrm using childform.show When I run the code, the code breaks in the mdi form code: childform.show saying: object can't be cast from dbnull to other types But it skips the line of code in the child form that causes the error. It took me an hour (proceeding by elimination in the load handler of the child form) befor I found the line of code in Me.load of the child form: childform that was the cause of the error. the line was: myDataAdapter.Fill(ds,"mytable") My question pls: How could I have my debugger break into the the line of childform (myDataAdapter.Fill(ds,"mytable") instead of skipping it and just breaking in the parent MDI form code ...Show All
