-
- Auto generate Uniqueidentifier / GUID in Select statement
by Kalhoro
- 3 Replies
- Last post
by Arnshea Clayton
- I am trying to Import Address book (Name, MobileNo) from Excel file. Everything is working. Because of the importing speed issue, I decided to add the column ID (GUID) to DataTable. Running the sql statement SELECT NewID() AS ID, Name, MobileNo FROM tablename (tablename is worksheet name in Excel) raises an exception and its clear for me that NEWID() function is not working for OleDb(Excel) databa
-
- How can I get XML's argument value from an element?
by Lucky:&#41
- 4 Replies
- Last post
by Martin Honnen
- I have an XML document.
how can I get argument value "Some Company", Smith or Brown
# Code private StringBuilder lbNodes = new StringBuilder(); main { XmlNode xnod = xmlDoc.DocumentElement; ReadChildren(xnod, 1); } void ReadChildren(XmlNode xnod, Int32 intLevel) { //Adds a node to the ListBox, togather with its children. //intLevel controls th
-
- Communicating between C# and C++
by Jpmon1
- 6 Replies
- Last post
by nielsvanvliet
- My company has all of it's applications developed in unmanaged VC++. We are looking to upgrade to C#, but it is just not feasible right now, because of the amount of code required to update. I would like to convert some of the apps (over time), but I need them to still be able to communicate with some other older VC++ apps (exe's and dll's). I have read several tutorials online about how to use wr
-
- Uniscribe with .NET 2.0
by LisaE
- 3 Replies
- Last post
by Feng Chen - MSFT
- I'm developing an application using the .NET Framework 2.0. I know for certain that I need to create my own custom control with multi-language support, and I have understood that I need the functionality of the Uniscribe API.
Since I haven't been able to communicate with Uniscribe in a managed .NET way, I wonder where I can find samples of code using Uniscribe via for instance P/Invoke
-
- Month and day names in spanish now lowercase..
by Heraclito
- 1 Replies
- Last post
by Net18nGuy
- In framework 1.0 month and day names were capitalized in spanish culture, now in 2.0 are lowercase.
Why Those are names, names are written capitalized, is a rule of the language. I can't even think one reason to write them lowercase.
Now, I have to search all the thousands of classes in my programs to find where month and day names appear. Worst, there is no easy way to capitalize a word in
-
- XQuery producing error
by DominicB
- 2 Replies
- Last post
by DominicB
- I have a method in my web service that returns a password for a given server and username. The login credentials are all held in an XML file on the network. The error I am getting is as follows:
Microsoft.Xml.XQuery.XQueryException : No document associated with this path expression
Here is the code:
protected string FetchPassword ( string servername , string username)
-
- How to correct 'error - input string not in correct format'
by Can-Ann
- 5 Replies
- Last post
by Peter Ritchie
- Can anyone help me correct this.
This line is giving an error
Code Snippet
dblAmount[2] = double .Parse (BD. dbCommands .ExecuteScalar( "SELECT SUM([AR-PAYMENT AMOUNT]) " + strSql, BD. MyGlobal ._ARConnection).ToString());
error = Input string not in correct format.
Code Snippet
public static object ExecuteScalar( s
-
- PropertGet. EvalException. System.Reflection.TargetParameterCountException
by lpszDan
- 7 Replies
- Last post
by Rick Byers - MSFT
- Could you guys tell me why am I consistently getting this exception, even though in my code I get mdGetter token and EnumParams on it returns 0 parameters necessary.
Then I go on with CallFunction and always get EvalException.
In EvalException I GetResult and get class info and class name and the exception class name is always System.Reflection.TargetParameterCountException.
I attach,
-
- Displays Excel worksheet in DataGridView
by YoungEngineer
- 9 Replies
- Last post
by Paul P Clement IV
- How can I bind an excel worksheet data to a datagridview Im trying to load an excel sheet with numbers to my form, im trying to get as much of a look and feel as excel as possible.
-
- JAVA equivalent code solves in 7 seconds, This C# never returns. What's going on?
by Haggs
- 11 Replies
- Last post
by OmegaMan
- using System.Text.RegularExpressions; using System.Text; using System; namespace TestRegex { public class RegExBench2 { private static String _doc = "CGAATCTAAAAATAGATTCGGACGTGATGTAGTCGTACAAATGAAAAAGTAAGCC"; private static int ITERATIONS = 1000000; public static void Main() { long start = System.DateTime.Now.Ticks / 10000; long end; l
-
- HowTo: Dynamically generate & embed unique Product ID
by InteXX
- 5 Replies
- Last post
by InteXX
- Hello
I'm building a custom ASP.NET server control, and I'd like to dynamically generate and embed a unique Product ID for each download.
My first thought for this was to use MSBuild to:
Start a process to modify the ProductId string in Resources.resx
Build the application
Run ILMerge to merge multiple asseblies
Run Dotfuscator to obfuscate and protect the code
All this wor
-
- Animated GIFs
by Alex-MyRpg
- 8 Replies
- Last post
by Alex-MyRpg
- Hi, I'm displaying an animated GIF in a PictureBox using .NET 2.0. Normally, it will loop indefinitely, but when you switch focus to another window and then back to the form on which the animated GIF is playing, the animated GIF has stopped on a certain frame and no longer animates (it stops at the active frame when it loses focus). Is there any way to "resume" the playback of the animat
-
- Using SHA256 with RSACryptoServiceProvider
by K Kumar
- 4 Replies
- Last post
by K Kumar
- Hi,
The below shown example works well with SHA1, but fails when i try with SHA256 or higher. The documentation i found in MSDN does not restrict from using other Hash Algorithms.Any clarification would be appreciated.
//Secret message
string message = "Meet me at 17:00 hours" ;
//The sender creates a rsa service instance
RSACryptoServiceProvider rsaSender =
-
- Reading/Writing Word Document as a binary stream fails
by ForEverLearning
- 4 Replies
- Last post
by ForEverLearning
- Hi,
I am trying to copy an MS-Word document as a binary stream.
In the future I will process the input and produce a different output - But for now, I am trying to get past a simple file copy.
The code below does not work.
It stops before the actual find ends. The generated file is not the same as the input.
But I check for end-of-file in the classical way - I tested this with s
-
- how to sign data
by A__P__
- 2 Replies
- Last post
by Martin Xie - MSFT
- Hello,
I would like to sign data (in order to create a licensing system) but I do not know from where to start.
I have a string containing licence information (depending of the customer) and I would like to sign these data.
I probably need to create a private key but I do not know how to do.
Then I will need to sign (generate signature from data) but I am a bit lost as well.
-
- BUG .net Form events order if started maximized
by RalphMM
- 3 Replies
- Last post
by eradicator
- HI , I am writing an application (.net 2.0 Framework) that starts other processes using the "Process" .net class. The user have the option to configure if the application should be started maximized or not. To start the application maximized i used the following code: Process process = new Process(); process.StartInfo.WindowStyle = ProcessWindowStyle.Maximized; process.StartInfo.FileN
-
- Is there an alternative to SendKeys?
by p0lar_bear
- 11 Replies
- Last post
by p0lar_bear
- Is there any other way to send a text string, or keystrokes to another window without having said window in focus What I'm trying to do is make my program send a command to a game server application when a certain event happens. I know about System.Windows.Forms.SendKeys, but it wouldn't work well in this case as SendKeys only sends to whatever program is in focus, and if I'm testing this program
-
- Consuming Java Based webservice
by SM-007
- 6 Replies
- Last post
by TimberChampagne
- Hi ,
I am trying to create a proxy class for a Java based webservice and I get the following error:
Microsoft (R) Web Services Description Language Utility [Microsoft (R) .NET Framework, Version 2.0.50727.42] Copyright (C) Microsoft Corporation. All rights reserved. Warning: This web reference does not conform to WS-I Basic Profile v1.1. R2718: A wsdl:binding in a DESCRIPTION MUST have the s
-
- Problem inserting date to SQL Server
by RPKJBP
- 7 Replies
- Last post
by ahmedilyas
- I have a DateTimePicker whose format is dd-MM-yyyy. While attempting to insert this value to SQL Server table column, following error is displayed: ------ERROR------------------------- The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. ------------------------------------ I tried following codes: (1) Int32 myRes = ModRes.InsertNewRecord("Ins
-
- Instrumentation and event logging
by byronfromwesleyan
- 1 Replies
- Last post
by Peter Ritchie
- Hello there. I am trying to figure out the EntLib v2.0. I 've coded listeners, providers, and factories for binding (honestly, without really knowing what I've done). I have the following InstrumentationConsumer in my listener in order to log an event log message when the ContentApproved event occurs: [CODE] [InstrumentationConsumer("ContentApprovedEvent")] public void ContentApp
-
- JAVA equivalent code solves in 7 seconds, This C# never returns. What's going on?
by Haggs
- 11 Replies
- Last post
by OmegaMan
- using System.Text.RegularExpressions; using System.Text; using System; namespace TestRegex { public class RegExBench2 { private static String _doc = "CGAATCTAAAAATAGATTCGGACGTGATGTAGTCGTACAAATGAAAAAGTAAGCC"; private static int ITERATIONS = 1000000; public static void Main() { long start = System.DateTime.Now.Ticks / 10000; long end; l
-
- Unrecognized escape sequence \*
by Ak5intoe
- 7 Replies
- Last post
by Ratzinger90
- In my code I'm trying to escape the * and + however at designtime the * or + is being underlined and the error is "Unrecognized escape sequence".
Regex fileOffset = new Regex ( "\* [0-9]+{1}" );
I'm just trying to find a number that starts with a + character (My example uses the * because that's the example the help file provides)
The help file says "For examp
-
- ActiveXObject("Scripting.FileSystemObject"); and network drives
by Mark Blankestijn
- 1 Replies
- Last post
by Mark Blankestijn
- Hi all,
I never posted here before so I hope this is the right place.
I got a small site/HTA that is supposed to be run off a network drive. This network drive is on a server somewhere in the building and this drive is also mapped to the letter V.
This code is run to check if a certain Word document is available and if it is, MS Word will open the document:
Code S
-
- calculating text metrics
by clevijoki
- 5 Replies
- Last post
by Chris49
- So I'm trying to create a text editing control from scratch in C# and I need to be able to calculate the text metrics for a word and parts of a word accurately. The only two ways I have found to calculate these is with TextRenderer.MeasureText and Graphics.MeasureString. Both of these are adding padding to the front and back of the text. The StringFormatFlags seem to have no effect on removing thi
-
- OleDbTransaction Commit Problem
by Turbojohn
- 7 Replies
- Last post
by tom-
- Hi,
I am having a problem commiting an Update command. My application either does not perform the commit succesfully, i.e. when I refresh my DataGridView the Update has not been performed
OR
When I use ExecuteNonQuery() my application crashes!
Am I doing something wrong in my code
Code Snippet
// Setup a new OleDbConnection called conn
// using the c