|
calhuskerfan wrote: Here is a very quick (and sloppy) example that reproduces the behavior.
You didn't understand my post. Using SQL Express 2005 with a Table1 designed as your example with the two column primary key constraint.
One row in the table as follows:
Type Value Data
------ ------ --------------------------------------------------
1 2 ABC
Executing the following SQL
insert into Table1 (Type, Value, Data) VALUES(1, 3, 'ABC ')
Produces this error:
Cannot insert duplicate key row in object 'dbo.Table1' with unique index 'IX_Table1'.
led mike
|
|
|
|
|
I tried your test case and ran into the same problem. Seems that when the values are compared, the trailing spaces are removed (or added until the length is the same).
Actually the same effect can happen in SQL Server when varchar data type is used so this may be by design.
Quickly cannot think anything else than replacing trailing spaces with a special character that can be later removed (like ascii 255).
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
My application working fine in the dev environment.But in the testing /production environment
it is not working because that environment has only
windows server 2003
IIS
.net2.0 framework
In my application I have Used some microsoft VC++ dll's also along with .net dll's.
Now Iam getting "RUNTime Error" pop-up screen message as below
" The Application has been terminated in an Unusual Way"
On googling i came to know that some dll's like msvcrt.dll of windows server 2003 has to be changed...But Iam not pretty sure about it..
In Production/test environment there is only framework installed ,but there is no visual studio installed on it.may be due that this error may occur...
So kindly post your suggestions and views to help me
I tried the following as suggested by you:
1. I have installled the redistributable package suggested by you.
after installing i restarted the PC even now also I got the same runtime pop-up error.
2. Then I checked even with the dependency walker for the dll.
I found that there is no miising dll.
3. Then I tried by installing Visual C++ express edition..even then also i got the same pop-up error.
Kindly help me.....
|
|
|
|
|
Please don't cross post, it's considered rude and isn't going to help you get an answer any faster. The original post is here[^].
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
modified on Tuesday, October 14, 2008 2:38 PM
|
|
|
|
|
Scott Dorman wrote: The original post is here[^].
From my point of view, it's here[^].
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Yep, you're right. I didn't see that one.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Hi all!
My application is having a strange behavior and I can't find how to solve it.
I have a thread that executes an application using AppDomain.CurrentDomain.ExecuteAssembly(app);. I have a try/catch block surrounding this statement and catch for any Exceptions (assuming this are Unhandled exceptions from the application I'm executing.
Here is the code:
try
{
AppDomain.CurrentDomain.ExecuteAssembly(AUT.File);
}
catch (Exception excp)
{
logger.Warn("an exception was unhandled: " + excp.ToString());
}
The thing is that when I'm executing this code with debugger (in Visual Studio) the behavior is as I expected, i.e, the try/catch block catches unhandled exceptions inside the assembly I'm executing. But If I run it without a debugger the try/catch block doesn't catches unhandled exceptions. But a message box is shown informing of the thrown exception.
Why this behavior? How can make it have always the same behavior?
Thanks
José Tavares
|
|
|
|
|
Well the reason this happens is because all Windows Forms applications handle all unhandled exceptions by default in the Application.Run loop. If I add
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException);
all unhandled exceptions that occur in this application are re-thrown and my application code catches the exceptions.
The problem is that I want to use my application to test 3rd party apps sometimes don't having the code. Is there any other way to reproduce this behavior from outside the application or will I have to use Reflection to add that line to every application that I will test?
Thanks
José Tavares
|
|
|
|
|
Hi!
i have to zip a folder, when i use ZipPackage, it creates a [Content_Types].xml in the created zip file. I don't want it and can not find a way to omit it.
Help me pleaaaase
|
|
|
|
|
I am also getting same problem..if you find any solution please let me know..
thak's In advance.
ramanakant.
|
|
|
|
|
I had a very big doubt regarding the windows search api which im trying to implement in my search engine.I want to use windows serach api - Advanced Query Syntax to search a particular search criteria in sql server dtabase.Since Isearch manager classs of WDS API needs index to be specified ; when i give my table index it throws an exception "Error HRESULT E_FAIL has been returned from a call to a COM component".
It would be great if smebody guide me thru this or atleast sum pointers.I have been really stucked up past 5 days with this.Please mail me the code snippet for the same.
My mail id is online.shraddha@gmail.com
|
|
|
|
|
You've been wasting your time for 5 days because Windows Search doesn't work with SQL databases. Where di you find documentation that says it works with SQL??
|
|
|
|
|
Hey Dave,
Thank you so much.Preasently I am using full text search feature of sql server 2008.Can u please suggest me sumthing better thah this which will increase my search performance and also will narrow down my search.
Thanks
Shraddha
|
|
|
|
|
You're using the best product for the job. Perhaps you should be looking at your database structure and indexing for better performance.
|
|
|
|
|
ok..What if i write api which is same like windows serach api; but for database?Coes that sound good?
|
|
|
|
|
shraddhapingale wrote: What if i write api which is same like windows serach api; but for database?Coes that sound good?
No, it doesn't.
The best search engine will only works as good as the underlying database structure. But, if you wanted to take, probably, more than a year to develop you're own search engine, far be it from me to stop you.
|
|
|
|
|
Am using Enterprise Library 3.1 for logging exception in my webapplication. In debug mode its logging the exception. But in Publish mode its not logging the its not logging the exception.
Please let me know what needs to be done.
TIA
Regards,
Praveena
|
|
|
|
|
Hi I have vc++ 6.0 application and i am trying to port into .Net framework (VS2005). One of my process needs to be run in Admin credentials and for the I have added manifest file in application resource using
(#define MANIFEST_RESOURCE_ID 1
MANIFEST_RESOURCE_ID RT_MANIFEST "Test1.exe.manifest") commands and this get added into resources. I also created the Test1.exe.manifest file and provided credentials as follows:
[
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="Test1.exe"
type="win32"/>
<description>Description of your application</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="requireAdministrator"
uiAccess="true"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
]
Even provided "requireAdministrator" credentials in requirePriviledge tag my application is running with the normal user credentials instead on Admin credentials. While building application with this maifest added it is giving Warning as follows:
[
manifest authoring warning 81010002: Unrecognized Element "requestedPrivileges" in namespace "urn:schemas-microsoft-com:asm.v2"
]
Please let know how to run applcation with Admin credentails.
THanks
SNI
jhghjghj
|
|
|
|
|
Maybe try
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="Test1.exe" type="win32"/>
<description>Description of your application</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level='requireAdministrator' uiAccess='false' />
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
This is not working. still the output is same.
jhghjghj
|
|
|
|
|
So you voted him down because his suggestion didn't work??
|
|
|
|
|
I guess in all fairness, my answer was unhelpful if it didn't work
I do, however, take that as an indication that I don't need to look
into it any further.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Very true! I've gotten a few of mine voted down too. Is it just me, or has this become a bit more common recently??
|
|
|
|
|
I think it's mostly because there's only two choices for
voting initial replies...could be wrong.
I actually won't stop pursuing the problem if the OP is
doing his/her part on the other end....doesn't seem to be
the case here
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
You aren't going to get many answers if you vote people down for trying to be helpful. It says "Helpful answer" not "Did it do everything you wanted it to, even though you missed bits out".
|
|
|
|