|
hi,
No.. not that what I want..
Suppose that I have table with 70 rows data..Now How can I generate SQL Script for create Table with 70 rows data in a another database?
regards,
pubudu.
|
|
|
|
|
just select out all of the values from the first table, go through them row by row and add them to a query, then just write the generated sql to a file from your application.
select * from table_1;
in your code then begin a String query = "create table_2....;"
then for each record returned in your query add it to query like so
query+= "insert into table_2 values (" + value(s) from query + ....");"
Does this help? or am I missing what you are trying to do?
Brian Van Beek
My Blog is Awesome, ok maybe not, but is still fun!!
|
|
|
|
|
Hello guys...I have a problem in here...(Who doesn't??;))
How can we connect crystal report to database manually not via database expert??
Thanks before..
Best regards
|
|
|
|
|
hi,
1) You have to create Data Set using "Data Set" in the add New Item Dialog.
2) Add Teables what do you need to generate report.
3)after that you can add that data set to your crystal report using database expert-->project data-->Ado.NET datasets..
4)complete database expert wizard.
3) then write like code to generate report :
Dataset1 ds2=new Dataset1();--->This is instance of Dataset1 class.
System.Data.SqlClient.SqlDataAdapter oda=create adapter instance using ur Query..
oda.Fill(ds2,tablename); (Give tablename=Table name in the query)
Now use this dataset object (ds2) to fill report..
regards,
pubudu.
|
|
|
|
|
hi pubudu..
I knew those way..At ur step 3,u still use database expert to connect to database..and u still use dataset.What i want to know is how we can view data from blank field in crystal report and we can set that source data in code behind..of coz..we need to know how to connect the database too..
Dont use .net facility for this..just coding..How that can be done?
The main problem is how can we view our report properly when we want to change the server..
Thanks again..
|
|
|
|
|
Hello,
The below article might help you. Is this you want?
http://support.businessobjects.com/library/kbase/articles/c2010371.asp
|
|
|
|
|
I can't seem to find and use the Image.FromFile method.
MSDN states that there is this function available and I have already included: using System.Drawing
Can anyone help me please?
|
|
|
|
|
Os Sutrisno wrote:
find
Find?
See this.[^]
<italic>Work hard, Work effectively.
|
|
|
|
|
Find as in when I type Image myPic = new Image.
Intellisense doesn't list FromFile as one of the methods.
Anyways, I found out what was going on
.Net Compact Framework doesn't support Image.FromFile
|
|
|
|
|
Image class cann't be instantiated from,You must do it from Bitmap().
|
|
|
|
|
The FromFile method is a static method. Therefore, you do not call it from an instantiation of the object, you call it right from the Class itself.
Wrong:
<br />
Image myPic = new Image;<br />
myPic.FromFile("someFileName");
Correct:
<br />
Image myPic = Image.FromFile("someFileName");
|
|
|
|
|
I have MAC "52 08 29 0E D9 BF 0B 6D" and i can des encrypt it to "0E C7 55 E2 85 3D F8 93" but how to des decode it back to orginal MAC?
Key is "37 97 23 23 97 89 FD 9D" and initial vector is "00 00 00 00 00 00 00 00".
-Suortti
|
|
|
|
|
This code typed directly into the browser with no testing.
System.Security.Cryptography.DES des =
new System.Security.Cryptography.DES();
byte[] key =
new byte[] { 0x37, 0x97, 0x23, 0x23, 0x97, 0x89, 0xFD, 0x9D };
byte[] iv =
new byte[] { 0, 0, 0, 0, 0, 0, 0, 0 };
using ( des )
{
System.Security.Cryptography.ICryptoTransform dec =
des.CreateDecryptor( key, iv );
using ( dec )
{
dec.TransformFinalBlock( mac, 0, 8 );
}
}
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
didnt help much
|
|
|
|
|
I have a simple application that I am using to learn C#. The application contains two textbox fields and a button.
The program consist of a method that calculates the sqare root of a number (data type float)
How can I display the result in a textbox if the textbox only takes text
Example
result is res=1.5
textBox1.Text=res -- compiler error
thanx for the help
|
|
|
|
|
res.toString();
<italic>Work hard, Work effectively.
|
|
|
|
|
Some Samples:
<br />
decimal inputDecimal = Convert.ToDecimal(txtInputTextBox.Text);<br />
<br />
string myString1 = inputDecimal.ToString(); <br />
<br />
string myString2 = inputDecimal.ToString("0.00"); <br />
<br />
string myString3 = String.Format("{0:0.0000}", inputDecimal); <br />
<br />
string myString4 = String.Format("The Result is: {0:C}.", inputDecimal); <br />
|
|
|
|
|
hi
how i can make a stand alone c# windows application?
i want to use it somewhere without installing .NET frameworw.
thanks
|
|
|
|
|
ABBASI_RA wrote:
how i can make a stand alone c# windows application?
i want to use it somewhere without installing .NET frameworw.
Write it in C++. That's your only option. And don't use managed C++, or you'll need the .NET framework all over again
The reason everyone ships their .NET apps with a dependancy to the .NET framework is because that's the way it works. Your compiled C# program is not recognisable to any computer, the .NET framework is needed to compile it into a final executable.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
But, why can't Microsoft provide an option to prepare a stand-alone executable file in .NET for C# etc.?
Let there be an option for those who want managed code and dependency on .NET framework.
But let there also be an option for those developers who want their .NET application to be converted into stand-alone executable, may be at the cost of tying it with a particular operating system or processor-family. It is also possible for Microsoft to allow creation of stand-alone code for a particular OS (such as WIN XP) or a group of OS's. Later on the OS can have some mechanism to cater to different types of processor-family. In the olden days, in C compilers, there used to be an option at the time of compiling to "optimise" for a particular processor-family. Why can't Microsoft come up with some innovative idea?
At least, there could be something in the installation / setup program, which could convert the .NET executable to the stand-alone executable for that particular machine using utility such as ngen.exe . But, in such a case, the .NET IL (or MSIL) file containing all information about the coding should not be installed. Can there be a mechanism like this? Or, can Microsoft innovate such a mechanism which should not be difficult to imlement in .NET version 2.0?
If Microsoft wants a "transparent" code for other developers, why can't it make its own windows "core" code public?
|
|
|
|
|
Anonymous wrote:
But, why can't Microsoft provide an option to prepare a stand-alone executable file in .NET for C# etc.?
Because the whole POINT of .NET is the virtual machine, which can in theory be ported to other platforms. Even within Windows, this means that versions of the framework can be written to optimise code for specific processors.
Anonymous wrote:
Why can't Microsoft come up with some innovative idea?
They did. It's visual C++. What you're suggesting is a whole lot of work to give us what we already have. Being able to write to a common intermediate language so that we can mix and match languages is more of an evolution than a revolution, but it's still a decent idea IMO. If you don't like it, don't use managed languages.
Anonymous wrote:
Or, can Microsoft innovate such a mechanism which should not be difficult to imlement in .NET version 2.0?
Given that 2.0 is in final beta, even if this was an idea they were likely to take up, it would not be in 2.0.
The MSIL compiler does NOT create an executable in memory, it creates functions, one at a time. However, just like you need MFC as a DLL to run MFC apps ( unless you accept bloat in executable size ), even the compiled .NET executable is bound to call .NET libraries - why would they compile the code to manage regular expressions ( for example ) into every app instead of having them in a library ? So the size of the download might drop, but it would still exist.
Anonymous wrote:
If Microsoft wants a "transparent" code for other developers, why can't it make its own windows "core" code public?
What on earth do you mean ? Are you saying that your issue is that MSIL can be decompiled ? In fact, it can, and that applies to Microsoft's .NET code also. How does that mean they should give away all their code ? Should Coke be forced to give us their recipe ? What's the difference ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
They did. It's visual C++. What you're suggesting is a whole lot of work to give us what we already have. Being able to write to a common intermediate language so that we can mix and match languages is more of an evolution than a revolution, but it's still a decent idea IMO. If you don't like it, don't use managed languages.
In fact, what I was suggesting was that you have the best of both worlds as an option, i.e., the ease of C# and the advantage of stand-alone executable.
In any case, the main problem with managed code is that its MSIL code is so transparent that everything (including some portions of code such as licensing of trial version, encryption keys, etc.) can easily be seen by utilities like ILDASM and Lutz Roeder's Reflector. This problem is not so much with VC++, but then it is a difficult language comparatively. For a small developer for shareware etc., it matters a lot, though it may not matter for a big developer like you with Microsoft MVP status. So, it is a question of combining ease with features (i.e., some features at least as an option).
One should look at sharewares. How many sharewares are written in C# inspite of its ease? You will hardly find many. This is so inspite of the fact that C# is now existing for last 4 to 5 years. So, is it not that something is holding back C# from certain fields at least? I think C# is more useful for intra-company utilities and the like. If you want to launch a utility to the outside world, then you should be ready for an open-source treat for your C# application.
Christian Graus wrote:
What on earth do you mean ? Are you saying that your issue is that MSIL can be decompiled ? In fact, it can, and that applies to Microsoft's .NET code also. How does that mean they should give away all their code ? Should Coke be forced to give us their recipe ? What's the difference ?
I Don't believe in Microsoft bashing. Let them keep their code secret. But, don't you think that MSIL is slightly over-transparent, it does not permit you to conceal even a few secrets such as some important logic like licensing etc. The question is not whether MSIL can be decompiled, but whether it reveals all secrets. If it reveals all secrets, then sometimes decompiling may not even be necessary.
|
|
|
|
|
Anonymous wrote:
In fact, what I was suggesting was that you have the best of both worlds as an option, i.e., the ease of C# and the advantage of stand-alone executable.
Yeah, I get what you meant. However, as Nish said, you'd still need the framework, and you'd lose other advantages. Simply, it's not what .NET is for.
Anonymous wrote:
but then it is a difficult language comparatively.
Perhaps, but if this was easy, there'd be no money in it. That's MY problem with .NET
Anonymous wrote:
a big developer like you with Microsoft MVP status.
LOL - being an MVP doesn't actually mean anything about the sort of development I do. As it happens, I work for a fair sized company, but I do a lot of work on my own as well. And I would agree with you that security of code is an issue, especially for trial versions, etc. However, if I wrote a trial version of anything, it would be missing major pieces of functionality, and I would not ship that code. Even C++ can be reverse engineered, and every protection will get cracked.
Anonymous wrote:
So, is it not that something is holding back C# from certain fields at least?
Perhaps. However, you're guessing what the reasons are, you could be wrong.
Anonymous wrote:
I think C# is more useful for intra-company utilities and the like. If you want to launch a utility to the outside world, then you should be ready for an open-source treat for your C# application.
Well, IMO, that's where most of the money is anyhow.
Anonymous wrote:
But, don't you think that MSIL is slightly over-transparent, it does not permit you to conceal even a few secrets such as some important logic like licensing etc.
Yes, I already agreed with you here. It's sadly a by product of how the framework works. I don't see any way around it for shareware type products, but I don't see that tiny market sector as a driving force for Microsoft to add something that is fundamentally useless to most people - the end exe will still need the .NET framework, and advantages of the framework are lost.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Even if there was a C# native code compiler, it'd be pretty useless since you wouldn't be able to use the .NET f/w classes, as that'd require the .NET f/w to be on the target machine.
|
|
|
|
|
Yeah, that was my point also....
Christian Graus - Microsoft MVP - C++
|
|
|
|
|