Answer Questions
vakman casting problem
hi all, I fail to cast the following to VC++.Net in VS2003 anybody can help ------------------------------------------------------------------------------------------------------------------- //Origanal BYTE Buf[1024]; PSP_DEVICE_INTERFACE_DETAIL_DATA pspdidd = (PSP_DEVICE_INTERFACE_DETAIL_DATA)Buf; ------------------------------------------------------------------------------------------------------------------- //What i have converted, unable pass the compiler Char Buf[] = new Char[1024]; PSP_DEVICE_INTERFACE_DETAIL_DATA *pspdidd = (PSP_DEVICE_INTERFACE_DETAIL_DATA )Buf; ------------------------------------------------------------------------------------------------------------------- //This one can Pas ...Show All
Sylvain Arene Too many arguments specified error in stored proc
I'm getting a 'too many arguments specified' error when I call my stored proc. I've assigned the stored proc to a SqlDataAdapter and a DataSet which is called when the SqlDataAdapter.InsertCommand is called. I've checked the numbers of variables and I can't see where there is a mismatch in the number of arguments being called. I assume that this error has something to do with how I am retrieving the SQL autonumbered identity column (CitationID) with SCOPE_IDENTITY(). If someone could look over my code and let me know what I'm doing wrong, I would greatly appreciate it. Stored Proc: ALTER PROCEDURE tbl_Citations_AddNewRow @CitationType nvarchar (6), @ARTFlag nvarchar (7), @Title nvarchar (1000), @PublicationDate date ...Show All
SuperCoder0101 problem with WCF and APP.config
Hello, I have a problem with WCF: I used the classic example from the VS 2005 Template: the solution with 2 projects 1. WCFServiceLibrary project for the service, which contains [ServiceContract()] public interface IService1 ... and public class service1 : IService1 { ... 2. my Host (console application) If I do not use an App.config file everything works fine: [CODE] static void Main(string[] args) { Uri adresse = new Uri("http://localhost:6666/demo"); ServiceHost sh = new ServiceHost(typeof(WCFServiceLibrary.service1), adresse); sh.AddServiceEndpoint(typeof(WCFServiceLibrary.IService1), new BasicHttpBinding(), adresse); sh.Open(); Console.WriteLine("press Return..."); Console.ReadLine(); sh.Close(); } [/CODE ...Show All
Birendra Exception: DataTable internal index is corrupted: '5'. on ...
Hi, I have a problem with bindingsource component in framework 2.0. I have a combobox bound to a bindingsource which is also bound to a dataset with 2 related tables and a datagridview bound to the same bindingsource. What I want to do is : When the selectedindex property of my combobox changes, the corresponding cell value must be changed in the datagridview. But although the value in bindingsource changes, datagridview does not display the new value. That value is displayed after I move the mouse over that cell and make it invalidate its region manually. Another error I caught is the one that you can see as the subject of my post. I do not know why i have that message when I try to change the property of ((DataRowView)mybindi ...Show All
Leroyg displaying an image from the internet in a picture box / label?
Is there any way i can have a picture box and display an image in it that is hosted on the internet say for e.g. - picturebox1.image ( http://www.website.com/image.jpg ) any help or direction would be great, i would use web browser but i cant get rid of the boarders. I suspect that the reason you are having a problem using the code when pulling the URL from the textbox is that you are trying to assign the URL to DownloadData instead of passing it in as an argument. Try this instead: Dim buffer1 As Byte () = wc.DownloadData(textbox1.Text ) Alright... try this one on for size: Imports System.IO Imports System.Net ... Dim wc As New WebClient Dim buffer1 ...Show All
IvanOrdonez How to sort an xml data island by a field
I have an xml data island like this.. actually a few hundred web pages using a similar form <xml id="xmldataisland"> <table_T> <table_R> <field1>1</field1> <field2>Beer</field1> <field3>Mmm</field3> </table_R> <table_R> <field1>2</field1> <field2>Wine</field1> <field3>kkk</field3> </table_R> </table_T> </xml> that is, root > record > fields I would like to write a javascript function to sort the records within the xml data island by a view. So for example sortmyisland(xmldataisland, "field2"); I haven't got a clue about xsl - if anyone could help me write thi ...Show All
Davids Learning Securing SqlConnectionString
Hi, I want to secure my confidential data in database. So i have written a function. It will initially changes the user's (which i have created for data access) password and gives me the encrypted one of the new password. So the developer won't know the password. To get the connection i have to pass the username and the encrypted password into one module which i have written. It will decrypt the password, creates a connection and returns the SqlConnection object. Here i am facing the problem. After decrypting the password i have to attach the username and password in ConnectionString that can be readable by the developer. How can i overcome this. Please advice. Thanks in Advance. once th ...Show All
Manmeet Panigrahi Enterprise Library 2.0 on Vista?
Hi! Is there anyone who can confirm if the "Enterprise Library 2.0 January 2006" is supposed to install on Vista RTM or not When I try installing it on my development laptop running Vista Ultimate RTM I get an "Installation ended prematurely because of an error" and the Event Log says: Windows Installer installed the product. Product Name: Enterprise Library for .NET Framework 2.0 - January 2006. Product Version: 2.0.23366.0. Product Language: 1033. Installation success or error status: 1603. And: Product: Enterprise Library for .NET Framework 2.0 - January 2006 -- Installation operation failed. Is that the expected bahaviour on Vista I did try disabling the UAC and also "Run as administrator&q ...Show All
santaclaus Process.GetProcessesByName and case sensitivity/uppercasing of process name
When listing processes using Process.GetProcesses() I sometimes see “notepad”, and sometimes I see “NOTEPAD”, sometimes I find process named “iexplore” sometimes “IEXPLORE”. (This is consistent with Task manager displaying “notepad.exe” vs “NOTEPAD.EXE”.) What is even stranger the following code ProcessStartInfo startInfo = new ProcessStartInfo(“notepad”); Process result = Process.Start(startInfo); Resulted on couple of occasions with “NOTEPAD” process being launched as opposed to “notepad”. Unfortunately, using Process.GetProcessesByName(“notepad”) will NOT return any hits for processes with process with name “NOTEPAD”. This looks to me like a bug, if process name should be either consistently case sensitive or not, if it i ...Show All
D. Choquette Calculating with measurements
Hi, I want to make an application which asks for example "how much is 23 centimeters in millimeters". This should be random and showed in a label and the answer should be typed in a textbox. The problem is, i don't know how to randomize the measurements and how to get for example the "23 centimeters" and "millimeters" in a string. I hope i made myself clear about what i'm trying to do. Any one any suggestion Thanks in advance! "The problem is, i don't know how to randomize the measurements and how to get for example the "23 centimeters" and "millimeters" in a string." Sorry, Stilll not clear! You need to generate Random Numbers Best Reg ...Show All
AlucardHellSing FTP ?
Does C# have FTP Methods that are easy to use I will be starting on a project soon and have the choice of using VB, C#, or Java. I think the FTP issue will be my biggest hurdle and I want to make it as easy as possible from the start. Any hint, ideas, tutorials I could be pointed too would be great. Post any issues I might encounter if you have experience in working with theses methods. Thanks! The system.net namespace has classes and methods availble for FTP....which is available to VB and C# You should take a look at the FtpWebRequest and FtpWebResponse classes that are in the 2.0 framework as they are the closest there is without writing your own or using one of the many a third party versions ...Show All
joeydj stopping connections
Hi. I've done this before but for some reason I cannot figure where I am going wrong. When I start listening to a port, I want to stop listening to it, even if there are no connections. When listening, it is listening in another thread. I have 2 buttons, Start service, and stop service: Start Service: Creates a new thread, and it runs the method to Listen to the communication Starts this thread Stop Service: if the Socket Client is non null, then it stops the client tcp listener. null's the client socket. //this is where the exception is thrown straight away "A blocking operation was interrupted by a call to WSACancelBlockingCall" if the tcp client is not null then it stops the tcp c ...Show All
JayaC ASP.Net 2.0 pages don't comply with HTML 4.01
Hello all. As you know, ASP.Net uses ViewState to store page information. It means that there is a line <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="..." /> your page. Because of id begins with "__" HTML 4.01 validator says that this page doesn't comply with HTML 4.01. Does anybody know, what can I do to force ASP.Net to create pages that comply with HTML 4.01 Hello, this forum is for questions relating to web services (.asmx) and xml serialization. You may have better luck posting your question in an asp.net forum at http://forums.asp.net/ . Thanks! Alex ...Show All
solutions accessing a properties PropertyInfo
I want to access a property's PropertyInfo without knowing it's name, I can do this if an accessor invokes another method via putting the following code in the invoked method. string caller = new StackTrace.GetFrame(1).GetMethod().Name; string pName = caller.Name.SubString(caller.Name.IndexOf('_')); PropertyInfo info = <this>.GetType().GetProperty(pName); As a result the same method can be readily invoked by accessors of different properties and the method can do its work based on the property name, type, custom attributes etc But I also want to do something similar in an associated method that is not invoked by an accessor - but by a method in another class, which has an instance of the properties declaring class. If I were ta ...Show All
Netmaster0000 out of memory exception in .NET Remoting v2.0 - TCP Channel Binary formatter
Has anyone seen this error I am getting it when the server is supposed to return a dataset with response data. The database may be large but not more than a couple of megabytes. can anyone advise what could be the issue System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. Server stack trace: at System.String.GetStringForStringBuilder(String value, Int32 startIndex, Int32 length, Int32 capacity) at System.Text.StringBuilder..ctor(String value, Int32 startIndex, Int32 length, Int32 capacity) at System.Text.StringBuilder..ctor(String value, Int32 capacity) at System.Data.DataSet.SerializeDataSet(SerializationInfo info, StreamingContext context, SerializationFormat remotingFormat) at ...Show All
