|
Thanks for the tip, I'll check that tool out.
I've seen this message appear before with other applications, and it always appears after the application exits. It makes me wonder if activity during any part of the program's execution can trigger the message, but maybe Vista waits until the program exits to actually show the message (since there's little point in asking if you want to re-run the app as admin while the app is still running!).
|
|
|
|
|
What i need to do is to Insert a record into a primary table and then
insert a corresponding record into the child table.My problem is that the
Primary column is an identity column so after inserting into the primary
table when i need to insert into the child table i need to know the the
primary columns value(which is auto generated by the database) and then use
this value to inert into the child table.Any one who faced this problem
earlier .
i am using sql2005 and c# 3.5. No Data Set Involved in it.
Zubair
|
|
|
|
|
You could use a stored procedure to caputure the primary key of the newly inserted row and have it either return that back to the applicaction, or if you are only inserting one child row then just send the stored proc the child data too and have the stored proc insert the child.
|
|
|
|
|
Oh, and to get the last inserted identity value generated use
SELECT SCOPE_IDENTITY()
Note: It must be run in the same scope as the original SQL.
|
|
|
|
|
Hello Zubair,
There are two solutions to solve your problem
1. Either you can use stored procedure or,
2. If you have programming exprience then solve your problem as follow.
First insert record in Primary table, so primary column will autoincrement its value.Eg. suppose u r inserting student_name 'XYZ' in student table and stud_id is primary column.
Now, use select query to find the value of stud_id from student table by using the name of student that u hav just inserted.
eg. SELECT stud_id FROM STUDENT WHERE student_name = 'XYZ'
Now, u hav obtained stud_id which was autoincremented.
Now, use this value to insert it in child table.eg. suppose u r inserting it in table studentdetails table
INSERT INTO studentdeatails (stud_id,average) VALUES (stud_id, 70)
Ok... hope this will help u. Good luck
|
|
|
|
|
sourabhsorate wrote: There are two solutions to solve your problem
There are many more than that.
sourabhsorate wrote: use select query to find the value of stud_id from student table by using the name of student that u hav just inserted.
eg. SELECT stud_id FROM STUDENT WHERE student_name = 'XYZ'
What happens if you have two students called "John Smith" - It's a very common name and there are several in my phone book, some of them could even attend the same university.
|
|
|
|
|
I'm using the free edtFTP library to send a text file to an OpenVMS server. The transfer itself works fine, but at some point in the transfer process, the file looses its carriage returns (or linefeeds?), and the lines all wrap at the 512 character mark. How do I fix that? I've tried changing the encoding, but nothing seems to work.
"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." - Jason Jystad, 10/26/2001
|
|
|
|
|
John first of all I know nothing about FTP BUT if edtFTP Library is using readline to get the file line by line, from memory I think that readline strips CRLF.
Hope this helps.
Henry Minute
If you open a can of worms, any viable solution *MUST* involve a larger can.
|
|
|
|
|
I'll have to look at the source code - I just threw their binary into the solution and went with it.
"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." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: I've tried changing the encoding
Im being presumptuous John and assuming you mean 'ASCII/BINARY' encoding here, with the edtFTP TransferType (I think, I only had a quick look) setting - and I dont think thats it .. been a long time since worked with any sort of VMS, but it sounds like the record attributes of the file are 'none', ie in VMS Speak, 'fixed-512'..
What you need the record attributes to be are something like
Stream-LF or
Stream-CR-LF
There's a command that goes someting like $ SET FILE/ATTRIBUTE=<attribute> <file> that may or may not change the file attributes, but Im pretty sure you need the VMS end set to other than 'fixed-512' ..
Internally VMS stores the records differently, but I dont think thats relevant here - its the FTP server's job to handle it ...
Sorry, not much help ...
[edit] - this link has some basic info - Ive cut out three possibly useful bits, below ...
http://saf.bio.caltech.edu/vms_sheet.html[^]
$ ANAL/RMS <filename> Determine the attributes and organization of a file.
$ SET FILE/ATTRIB=(ORG:SEQ,RFM:FIX,LRL:512,MRS:512) <filename>
Reset the file's attributes, do not reorganize its data.
This is used most often to patch up files retrieved via binary FTP.
$ HELP [command] Display the 'manual page' for command
[/Edit]
Garth
modified on Saturday, January 10, 2009 1:18 AM
|
|
|
|
|
Those would be FTP commands? I'll look into that.
BTW, the code I'm writing is replacing a java app that didn't appear to have to do any of that stuff. The code is at work, so I can't post the relevant bits until Monday.
"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." - Jason Jystad, 10/26/2001
|
|
|
|
|
No, they are vms dcl commands -
the equiv of a dos shell/console session I guess
(You may be able to use ftp 'site' if its implemented in openvms ftp server - I doubt it)
.. Sorry bout formatting of this msg - I'm reading/replying from a crackberry Bold
|
|
|
|
|
That's not possible, then. I have to be able to just upload the file and have it be correct.
The code I wrote is replacing a java app that appeared to be able to just upload the file. In fact, the java app was able to call the CHDIR FTP command using the virtual folder name ("MY_FOLDER_001") defined in OpenVMS, while I had to use the this as my default folder: "MY_VOLUME:[MY_FOLDER.001]". Until I did that, I couldn't even transfer the file. I wonder why Java can do it, but C#/.Net can't...
"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." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: Java can do it, but C#/.Net can't...
its odd .. looking at their code they are obviously familiar with OS400, Unix AND VMS, yet you're having issues
as an aside, while I know you're doing it in C#/.NET, I wonder if there's any point to testing their free java client code or one of their commercial .NET products (they seem to have 'trials') as well
hopefully they will see your post to their forum and answer it soon - if you were using the free .NET version with a view to buying the commercial version, I could give them a call for you given they are in the same country - in my second home actually, Brisbane - but my guess is you dont want the commercial version
'g'
|
|
|
|
|
this might help too http://64.223.189.234/node/302[^] (a link to a page at Hoffman Labs " OpenVMS Tips: Portable Sequential File Formats; FTP ASCII Transfers and RMS Files"
'g'
|
|
|
|
|
Many thanks.
"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." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hi,
I apologize if this question is in the wrong place.
I inherited a C# windows service from a previous developer but I am having some trouble with his code. It is a windows service that can have classes loaded into it without having to recompile the service. I am assuming this is done by the windowsservice.exe.config file, specifically the
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="currencyworker" culture="neutral" publicKeyToken="null"/>
<codeBase version="1.1.0.0" href="currencyworker.dll"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
A second config file gives the name of the class and its namespace. The windows service takes that info and uses the Type.GetType(typeName); function on it and then instantiates it. The problem I am having is that the .GetType function keeps returning null when I start the service leading me to believe that my syntax or something else is wrong with the windowsservice.exe.config file and that the class(currencyworker.currency in my case) is not being loaded. I have gotten it to work before but its rather random and not consistent so I can't seem to locate what is going wrong. Any help on this would be great, my understanding of this is not high so I am sorry if this doesn't make sense or is confusing.
|
|
|
|
|
|
A Type name in a configuration file should be case-sensitive and fully qualified. That means that you need the namespace and the assembly name of the assembly its contained within:
Name.Space.CurrencyWorker, Name.Space
Assuming that a type CurrencyWorker exists in assembly Name.Space.dll or Name.Space.exe.
|
|
|
|
|
hi
how to close all the running application like
word , notepad ,photoshop .....etc
and thanks
|
|
|
|
|
....
"Well, we're getting "F"'d at work. WPF, WCF, and WWF... WTF?" --John Simmons
|
|
|
|
|
abu rakan wrote: how to close all the running application like
word , notepad ,photoshop .....etc
Shut down windows. That will close all the applications - and in a very green environmentally friendly way that uses very little power.
|
|
|
|
|
thanks
but want make that witout shutdown XP
|
|
|
|
|
Over a month and you STILL can't figure this out? Nevermind searchin google, CP articles or even the message board would have given you the answer.
Ugh. I got so tired of this I gave up and coded it for you.
Here is the damn code.[^]
|
|
|
|
|
thank you
if you woudnot to replay
dont replay
i didnot ask you
|
|
|
|