|
Doesn't such a calculator exist in windows already?
|
|
|
|
|
I thought of that myself. There's even a graphics calculator version in a PowerToys collection somewhere!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
When i transfer my c#.net project to other computer,the report part of my project that worked correctly in my computer,did not work and give me this error :
"absolute path information is required"
What is my problem? I use SQL Server database for my reports
I try to create a blank report with no database,but i get this error again.
thanks for your help.
|
|
|
|
|
hey hi guys, the problem i'm facing is that I'm running a query in my program using ms c# express edition 2005, like this:
string strSqlExec = "insert into orgchart(ID,Name,Picture,Dept) values (" + "1" + "," + "'" + "Noman" + "'" + "," + "'" + f.textBox2.Text.ToString() + "'" + "," + "2" + ")";
And f.textBox2.Text.ToString() doesnt save the text in the Picture column.
Any idea how to save something from a text box into some sql table field
regards,
noms
|
|
|
|
|
You might want to read this article on Preventing SQL Injection Attacks[^]. It will tell you how to do what you want AND in a way that is secure.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
Colin Angus Mackay wrote: You might want to read this article on Preventing SQL Injection Attacks[^].
Colin,
You beat me to it :->
Paul
|
|
|
|
|
Not sure why you can't get the value from the textbox, but there's no reason to use 'ToString()', since a textbox's text property is a string.
I'd put a breakpoint on that line of code, and do a quickwatch on the textbox2 object. You should be able to troubleshoot from there.
... oh and my $.02 about the updating a database this way ... it really is bad ... update should be done with stored procedures ...
|
|
|
|
|
Paul Brower wrote: update should be done with stored procedures ...
Agreed. Makes it nice.
Paul
|
|
|
|
|
hi
i am 3dsmax user ( almost professional )
and i am c# programmer.
and i want learn 3d programming with DirectX .
my question is : how to create my object in 3dsmax and bring it to my directx project and transform it in directx (for example rotate it around it's pivot point).
Please give a full description or article with demo or source because i am beginer in directx.
(i can just initialize Directx).
thanks...
|
|
|
|
|
You can use the .3ds to .x conversion tool included in the DirectX SDK extras. From there, you can use Mesh.FromFile to load the .x file.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
I want to add a progress bar to a small app but once i pass a script to the database i have no control until the script finishes. The app reads a script from a file modifies it slightly and then connect and pass the script to the database. I pass the script using the ExecuteNonQuery method. Here is that section of code. can anyone help?
here is my connection string format:
"Server=Server;Database=pubs;User ID=sa;Password=asdasd;Trusted_Connection=False"
int RowsAffected;
DBConnect.Open();
SqlCommand sqlscript = new SqlCommand(SQLFileReplace, DBConnect);
sqlscript.CommandTimeout = 5000000;
RowsAffected = sqlscript.ExecuteNonQuery();
|
|
|
|
|
You really can't track that. There is no status information sent back from SQL Server that you can use to track the progress of the script. At best, you can put up a "progess bar" that doesn't progress. It just spins endlessly until the call returns.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi there,
I have a VS2003 C# application which uses an unmanaged C++ library to create a bitmap that it writes into a PictureBox. To do this, I need to pass the C++ library the HWND to the PictureBox.
During initialisation, before the screen is drawn, I call pictureBoxVTKHolder.Handle
to get the handle as a System::IntPtr, and this always seems to generate a valid return value.
This is then passed through to a C++ wrapper for the unmanaged code. Within the wrapper, I try and cast it to an HWND with
phwnd = (HWND)hwnd.ToPointer()
Sometimes this works OK, but sometimes the cast evaluates to:
phwnd {HWND__} { unused=<undefined value=""> } HWND__*
Any suggestions gratefully accepted
Tim Thornton
Smartcom Software
|
|
|
|
|
Hi,
Does anyone know how I can allow my application to "receive" files either through "Open With.." or "Send To.." from windows explorer.
I've been searching but I don't know quite what phrases to search for.
Can I also make sure that only one instance of my application is open at a time, and any new files get sent to the already opened instance.
I'm coding in C# .NET 2.0 in VS 2005.
Thanks for your help.
|
|
|
|
|
Hi,
1. There is a SendTo folder under every user account. Just drop a link to your app there and it will show up in the Send To menu.
2. You can configure this under Explorer/Extras/Options/DataType. Visual Studio setup projects are able to automatically make the correct entries for your application.
3. Search this site for single instance[^]
|
|
|
|
|
Ok sorry, I wasn't very clear. I understand how to make file associations and to put things in the menus.
But I don't know how to write the hooks in my code to allow me to process the file I receive.
|
|
|
|
|
In general you just have to evauluate the parameters your Main function has. Have a look at the link I have provided. It not only shows how to do this but also how to pass those arguments to an already running instance.
|
|
|
|
|
Gotcha... I'm being a bit slow! It is friday though.
Thanks for your help
|
|
|
|
|
Dear all,
I'm just starting out in .NET and creating a simple application to store the personel information on staff, e.g. name, address, age etc etc.
My question is which would be the best storage for this type of information. I'm considering XML or a database. The application will be run on a single machine so it just needs to be something simple. It would be nice to be able to load the information into Excel too...
Any pointers would be a real help so I start down the right path.
Many thanks
Tom
|
|
|
|
|
I found SQLite to be a very good and simple storage media for small databases.
There's a ready-to-use DLL provided by Mono, but it also works fine with normal .NET applications
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thats great, thanks for the pointer...
|
|
|
|
|
i have a problem with the old projects , they are do not open in my new installation of visual studio.net IDE. How do i open that old project in newly;P installed IDE and debug.
thanks............
|
|
|
|
|
File/Open?? Just opening the solution or porject file should launch the conversion wizard which will upgrade the project files to the current version supported by the IDE, IF the conversion is supported.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I'm looking to do something seemingly obvious:
Hashtable h = new Hashtable();
foreach ( key in h.Keys )
h[key] = //something;
but I take it the assignment h[key] kills the enumerator of the foreach. Is there an elegant way to implement the intent of the above code?
Thx.
|
|
|
|
|
You can't change the key of a node in a hash table, as the entire table is arranged according to the hash codes of the keys. You have to remove the node from the table and re-add the object in the node using the new key.
---
b { font-weight: normal; }
|
|
|
|