|
|
It's a sql command that makes db changes (to tables) permanent.
Learn how to use google.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
check the exception that's being generated.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
How do you insert, delete and update?
|
|
|
|
|
with procedure and I examined these procedure with other database and these procedure work correctly
|
|
|
|
|
As you added this database file to your project did you maybe select "always copy" on the "copy to output directory" property (I don't know the exact phrase in the english studio for this)?
Because this overrides the "modified" database file with the old one (this will be done every time you build your project).
If so, try to use the setting "only if newer".
Greetings
Covean
|
|
|
|
|
How do you add database to program like this ?
can you tell me step by step ?
|
|
|
|
|
I would do it like to op wrote.
He added the db file <currentdir>\tmc.mdf.
Right Click on my program in Solution ->Add->Add Existing Item -> Select DB<br />
<br />
connectionString :<br />
<br />
Data Source=.\\SQLEXPRESS;AttachDbFilename="+Directory.GetCurrentDirectory()+"\\TMC.mdf;Integrated Security=True;User Instance=True ;
Greetings
Covean
|
|
|
|
|
so in this way I couldn't find this :
<<as you="" added="" this="" database="" file="" to="" your="" project="" did="" maybe="" select="" "always="" copy"="" on="" the="" "copy="" output="" directory"="" property="" (i="" don't="" know="" exact="" phrase="" in="" english="" studio="" for="" this)?
because="" overrides="" "modified"="" with="" old="" one="" (this="" will="" be="" done="" every="" time="" build="" project).
if="" so,="" try="" use="" setting="" "only="" if="" newer"="">>
|
|
|
|
|
This happens when a C#.Net windows application is closed. Does anybody know what the possible reasons are ?
.Net App
=========
This is a simple app that loads a VC++ dll to do all the work (decrypt a file, that is the work that it does)
VC++ dll is imported by DllImport as follows:
----------------------------------------------
[System.Runtime.InteropServices.DllImport("decrypt.dll", EntryPoint = "DecryptFile",CallingConvention=System.Runtime.InteropServices.CallingConvention.StdCall)]
public static extern Int32 Decrypt(String ip, String op);
The VC++ method is declared as follows:
-----------------------------------------
__declspec( dllexport ) int __stdcall DecryptFile(LPTSTR ipFile,LPTSTR opFile)
Is there something more to be done to ensure that the imported dll (decrypt.dll) is unloaded ?
In the code a static TCHAR array is used to do the math:
static TCHAR s[1000*32]; // _UNICODE defined. Can this be the problem ?
|
|
|
|
|
Because you use LPTSTR (non-constant sting pointer) on the dll-site you should try to use StringBuilder as paramtypes in your DllImport.
[System.Runtime.InteropServices.DllImport("decrypt.dll", EntryPoint = "DecryptFile",CallingConvention=System.Runtime.InteropServices.CallingConvention.StdCall)]
public static extern Int32 Decrypt(StringBuilder ip, StringBuilder op);
Greetings
Covean
|
|
|
|
|
Sorry, did not help, in this case. I still get the error.
modified on Monday, January 11, 2010 7:05 AM
|
|
|
|
|
I think its really hard/impossible to solve this problem without more code snippets.
The next interessting point is: At what address did your program crash?
Greetings
Covean
|
|
|
|
|
Try to remove the EntryPoint from the DllImport(Attribute).
Oopsie. That was useless.
Maybe this can help tho: http://msdn.microsoft.com/en-us/library/aa288468(VS.71).aspx#pinvoke_example2
[System.Runtime.InteropServices.DllImport("decrypt.dll", EntryPoint = "DecryptFile",CallingConvention=System.Runtime.InteropServices.CallingConvention.StdCall)]
public static extern Int32 Decrypt([MarshalAs(UnmanagedType.LPStr)]string ip, [MarshalAs(UnmanagedType.LPStr)]string op);
modified on Friday, January 8, 2010 8:09 AM
|
|
|
|
|
Sorry, did not help in this case, I still get the error. The article is informative though, thanks.
|
|
|
|
|
hi,
when we click a button .csv file will be in open mode
i.e, in visible
thanks in advance
|
|
|
|
|
What's the question? Why are you posting a VB question in the C# forum?
If you want to open a file in your program, check the System.IO[^] namespace, particularly the File[^] class.
If you want to launch a file in it's native viewer, run Process.Start[^] on it and windows will (hopefully) be able to figure out what to open it with.
If you want to know how to do things when the use clicks a button just drag a button onto your form from the toolbox and then click the button.
|
|
|
|
|
Hi Guys,
I have created an audit table to record the changes made to the tables in th db.
I want to keep track of the update version by using a counter ..to know how many times the particular field has been updated/inserted.
Can you let me know how i can go about achieving this,,,Thanks
modified on Friday, January 8, 2010 8:03 AM
|
|
|
|
|
This should be in the Database[^] forum.
In your trigger you can compare values to figure out which field has been changed; then you can keep a row or another table to hold counters for each field and increment the one that's modified.
Why use triggers for this? Why not use stored procedures to control access to your tables?
|
|
|
|
|
can i repost this in the db forum?
|
|
|
|
|
I don't see a problem with it, but then again I'm not the keeper of the site .
|
|
|
|
|
Yes, but edit your original post, e.g. "Accidentally posted to wrong forum. My apologies.", first.
|
|
|
|
|
Hi All,
I want to execute Log Parser query in my C# application.
Can any one guide me?
|
|
|
|
|
To answer with as much precision as you've asked: All you have to do is install it, configure it, and then use it.
Useful isn't it?
What's Log Parser?
|
|
|
|
|
How to export DataGridView to Excel without Microsoft.Office.Interop.Excel
|
|
|
|