|
Was able to solve actually had to cast it
select '['+CAST(ID As varchar(20))+'] '+Name As FullDetails from Emp
Resolved
|
|
|
|
|
iam declaring property in one class and using this property i want to
get a value from one page and set it to other page iwant an example code.
with regards
priya
priya
|
|
|
|
|
I suspect that your use of the word 'page' means you meant to ask this in the ASP.NET forum.
You can't get values from pages, only the page you're viewing exists on the server, and only just before the client sees it. you can pass values between URLs using the querystring
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
So, I have IE hosted in a windows app. This app adds functionality to a website ( long story ). So, the website has an area for typing reports. The people generating reports, use Dragon Naturally Speaking.
In IE, they can double click on a word and can type to replace it, or speak to replace it. In my program, they can double click on a word and it selects. They can press delete to delete the word. If they type ( or speak ) it doesn't work. If they scroll to highlight the word, then it works, but not if they double click.
Does anyone know what's happening here ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Are you sure it's not losing focus for some ungodly reason? It could explain why it's not working properly.
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
I thought it may be a focus issue, and perhaps it ultimately is, but what weird focus state means you have highlighted a word, the delete key deletes it, but other keys don't work ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Right, yeah *scratches head*
I do know of one other situation where stuff doesn't work properely in IE, here at CP. When I post messages, occasionaly the shortcut Ctrl+V doesn't work and i have to right click - paste instead, also sometimes the backspace or delete key will not work, I forget which. So it could just be some crazy stuff with IE although lets hope not
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
Well, the crazy thing is, it works fine in IE, until it's embedded in my app. That's the point at which it's assumed to be MY problem.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I think it's IE gets screwed up when it is hosted by another application. For example if you use this[^] to host IE, you won't be able to navigate to another website.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Yeah, that seems to me to be the case. I am just hoping there's a way around it. Sadly, googling 'internet explorer host keyboard focus' gives me a lot of useless stuff.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi All!
I've been trying to port my apps from VS6 to 64 bit.
When I use serialization to write classes to fie - what should be a 27mb data file becomes 459mb!
And it runs S-L-O-W.
There are no methods (functions) in the classes. Just data.
The data file was created the (EASY) old way by writing structs to a binary file.
I also tried that "marshall" thing - what a joke!
So, my question is how in the world do you write structs or classes to a file without tons of overhead?
I know I can use C++ native code but surely there must be a better way.
If not, can native code be compiled to 64 bit?
thanx for any responses
bigchump
|
|
|
|
|
bigchump wrote: I've been trying to port my apps from VS6 to 64 bit.
One has to ask if you're porting to C#, or if you're just lost ?
bigchump wrote: If not, can native code be compiled to 64 bit?
Yes.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
<blockquote class="FQ"><div class="FQA">Christian Graus wrote:</div>One has to ask if you're porting to C#, or if you're just lost ?</blockquote>
I've ported everything to C# and am generally pleased.
My business requires me to write my own programs.
I've been doing it for over 20 years using C and assy.
But I'm not any kind of expert and need some answers in plain English.
The help screens in VS8pro are virtually worthless to me. I don't understand the jargon AT ALL.
Never liked C++ and don't want to use it *IF* I don't have to...
It's really annoying to have my 32 bit machine run circles around my 64 bit stuff.
So back to my question, is it possible to create a custom database with C# that is compact and runs fast?
thanx
bigchump
|
|
|
|
|
bigchump wrote: So back to my question, is it possible to create a custom database with C# that is compact and runs fast?
Wow - I didn't get that this was your question at all.
Why would you use a custom database ? SQL Server Express is free, there's an edition that actually embeds the DB in your app, or you can still use an Access MDB database. They will all run fast enough for most applications.
you can set the compiler to build 64 bit, but in C#, the default setting is for both, b/c the framework itself builds your final exe, unless you need to write 64 bit specific code, that seems the best option to me. In fact, I have found the only reason to specify 32 or 64 is to specify 32 to force 32 bit compatibility mode if needed.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks Christian!
My database is over 20 years old and grows by about 512K every day.
I don't know anything about SQL except that I run circles around people who do use it.
My compiler is set to "any CPU" on my 64 bit machine. I understand all that stuff.
What I don't understand AT ALL is the inability to read/write a struct/class directly to disk without a whole lot of overhead involved.
I only get paid if I am the first one with the answer, therefore speed is critical.
From my perspective, this whole DOT NET thing is a throwback to the old "interpeter" days with this JIT thing.
I don't understand why the JIT compiler "chokes" (only at 64 bit, not at 32) the first time a large function is called.
I can write a native console app to retrive the data and write a small temp file that a C# app can then read.
The problem with that is the original 32 bit app is still faster and there's every indication that the native app is running @ 32 bits.
It's also likely that I've got my head screwed on backwards and am missing something simple.
thanx
bigchump
|
|
|
|
|
bigchump wrote: My database is over 20 years old and grows by about 512K every day.
Oh, a custom format ?
bigchump wrote: I don't know anything about SQL except that I run circles around people who do use it.
Well, if you're not using SQL, you're using some specialised code written for your purpose, no surprise it may work faster than a more generalised approach ( but still impressive )
bigchump wrote: What I don't understand AT ALL is the inability to read/write a struct/class directly to disk without a whole lot of overhead involved.
Well, did C++ just write a class for you ? You can store a class the same as you did in C++, by writing code to stream the component parts, if you like. Serialisation actually works mostly for free, if you're only using simple types that know how to serialise themselves.
bigchump wrote: I don't understand why the JIT compiler "chokes" (only at 64 bit, not at 32) the first time a large function is called.
Because it's compiling it. Why is your function so large ? What do you mean by 'chokes' ?
bigchump wrote: It's also likely that I've got my head screwed on backwards and am missing something simple.
I suspect that I'm not fully understanding you just yet
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Christian!
Christian Graus wrote: bigchump wrote:
My database is over 20 years old and grows by about 512K every day.
Oh, a custom format ?
Yes, a relatively small file on HD is indexed to database on tape drives to find records that match.
bigchump wrote:
I don't know anything about SQL except that I run circles around people who do use it.
Well, if you're not using SQL, you're using some specialised code written for your purpose, no surprise it may work faster than a more generalised approach ( but still impressive )
There's no comparison to SQL. I wrote all the code many years ago before SQL even existed.
bigchump wrote:
What I don't understand AT ALL is the inability to read/write a struct/class directly to disk without a whole lot of overhead involved.
Well, did C++ just write a class for you ? You can store a class the same as you did in C++, by writing code to stream the component parts, if you like. Serialisation actually works mostly for free, if you're only using simple types that know how to serialise themselves.
IF I UNDERSTAND YOU, COMPONENT PARTS MEANS WRITING ONE ITEM AT A TIME TO A BINARY FILE.
The problem with that is one of these classes has over 1500 different items.
That would mean writing 1500 lines of code to write and another 1500 to read????
bigchump wrote:
I don't understand why the JIT compiler "chokes" (only at 64 bit, not at 32) the first time a large function is called.
Because it's compiling it. Why is your function so large ? What do you mean by 'chokes' ?
I tried breaking it down into several smaller functions. It just ran slower. "Chokes" means serious delay.
Why does it choke at only 64 bits and not at 32??????
bigchump wrote:
It's also likely that I've got my head screwed on backwards and am missing something simple.
I suspect that I'm not fully understanding you just yet
That's because I'm not a programmer by profession. It took me a while to figure out what "component parts" meant.
|
|
|
|
|
yes, in C++ you would write your own code that uses a stream to store the different properties you need to restore a class, and you'd write code to read the values back out and assign them to properties in a new class instance.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
bigchump wrote: From my perspective, this whole DOT NET thing is a throwback to the old "interpeter" days with this JIT thing.
CSharp is an Imperative language not Interpreted. Here[^] in an explanation.
bigchump wrote: I don't understand why the JIT compiler "chokes" (only at 64 bit, not at 32) the first time a large function is called.
Because the machine code doesn't exist the first time a large function is called. It lives as IL code and has to be JIT'ed into machine code. If you've come from C programming and did a port, then you probably kept the nuances of C which don't work so well in C#. I think in order to pinpoint your performance issues, you may want to consider a profiler[^]. It'll be nigh on impossible to tell where you're going wrong here.
bigchump wrote: What I don't understand AT ALL is the inability to read/write a struct/class directly to disk without a whole lot of overhead involved.
Have a look at this[^].
Scott P
“It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.”
-Edsger Dijkstra
|
|
|
|
|
Hi Carbon:
"It'll be nigh on impossible to tell where you're going wrong here."
Going wrong? I don't think so. My 32 bit app beats everything else out there.
The problem is it's written in c/c++ with some assy. that doesn't compile with VS8.
So I re-wrote the entire thing in C#. Now I've got a 64 bit dog. That's all I know.
I never liked c++ and hate to use it but I'm becoming desperate and need some advice in the King's ENGLISH I can understand.
I read that thing ("have a look at this") and hardly understood a word of it.
My app is really simple. Read a few struct/class from disk and run about 3000 "if" statements on it and come up with an answer.
thanx for any help
bigchump
|
|
|
|
|
<quote>Going wrong? I don't think so. My 32 bit app beats everything else out there.
Well obviously something is going wrong. If you 3000k if statement wonder program can run circles around everything else ever written by mankind, why don't you just use your old VS version? I don't mean to be hostile, but it seems like you're being hostile to everyone that's trying to help you. You're going to have to learn correct terminology if you're going to a) get your point across and b) understand what people are trying to tell you.
Perhaps the sound of your own awesome is distracting you?
|
|
|
|
|
Hey Tom!
Sure my 32 bit stuff is fine. Just like a Model T Ford. Sooner or later I will get beaten if I don't keep up.
By the way, it ain't a "wonder program". It's the result of many years of very hard work.
I read the King's English just fine but words like "extensibility" and "com object" are just jargon to me...
If I were to say "Quitters stretching out with a big ML should be included in your exotics" is my jargon and may not mean a thing to you.
The difference is -- I know when to use my jargon and when not to.
When the title of the post has the word "amateur" in it - it might mean that someone doesn't understand the jargon.
Of course, it is my choice whether to continue with C# or not. I was hoping for some help. I didn't get it.
All I did was get chastised.
Not one person explained to me why a 27mb file should become over 400mb. Not one.
Oh, if you're wondering about my "wonder program" you can find it on TVG.COM under "TVG PICKS\Free Handicapping Info".
So, C# and Bill Gates can go to the same place.
I'll re-write in c++ much as I hate it.
bigchump
|
|
|
|
|
bigchump wrote:
Going wrong? I don't think so.
Going wrong with the C#. Nobody is disputing the performance of your other program. Sheesh.
bigchump wrote: I never liked c++ and hate to use it but I'm becoming desperate and need some advice in the King's ENGLISH I can understand.
Granted the link I sent you is a mildly technical post, but I think it's the direction you should take. I suggest reading through it again and try to make some sense of it. I don't think there's an easier answer with the performance you want. I appreciate your plight here, but you'll have to take the bull by the horns and make a better attempt at learning how to use the language. If you don't have reference material, I highly suggest getting CLR via C# by Jeffrey Richter, and Programming Visual C# 2005: The Language by Donis Marshall.
If you posted the code that's loading the data from the binary file, it may be useful.
Scott P
“It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.”
-Edsger Dijkstra
|
|
|
|
|
Hi Carbon:
"Going wrong with the C#. Nobody is disputing the performance of your other program. Sheesh."
Brother, I think you're missing the point. When should a 32 bit app outperform a 64????????
Somethings gotta be wrong somewhere. Maybe my head's screwed on sideways. That's a possibility I don't discount.
I PORTED ALL MY APPS TO C# AND ONLY ONE IS CAUSING THIS MISERY.
When I say all, I mean over 14 different apps and only one doesn't work properly.
Even the one with problems works OK just EXTREMELY SLOW. But slow is a killer in my business.
What I need is a way to read/write structs/classes to file without the MAJOR OVERHEAD.
sorry if I sounded hostile - I just need some help without any wisecracks..
bigchump
|
|
|
|
|
"If you posted the code that's loading the data from the binary file, it may be useful."
Here's the code but the problem is not loading data but the SIZE of the file that is created.
public void DeSerializeNow()
{
header c1=new header(); //change to header - horse - results
horse[] c2=new horse[29];
Stream s=File.Open(@"C:\baduga\manure.tmp",FileMode.Open);
BinaryFormatter b=new BinaryFormatter();
while(true)
{
try
{
c1=(header)b.Deserialize(s);
label1.Text+=c1.track+" "+c1.poly+" "+c1.entries+" "+c1.par2f+" "+c1.par4f+" "+c1.par6f+" "+c1.parspeed+"\n";
for(int y=0;y<c1.entries;y++)
{
c2[y]=(horse)b.Deserialize(s);
label1.Text+=c2[y].post+",";
}
label1.Text+="\n";
}
catch
{
s.Close();
break;
}
}
}
Note the label stuff is just for debugging - it ain't used in real life...
thanx
bigchump
|
|
|
|