Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
A

adi rusu

@adi rusu
About
Posts
16
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Visio Org Chart Wizard
    A adi rusu

    Hi, I have a C# application that generates an organization chart using the Microsoft Visio Org Chart Wizard. It works just fine but i was wondering if it were possible to place the items on the chart at a custom position. Right now, the items are placed starting at the top of the page and i'd like them to start a bit lower. Thanks

    C# csharp

  • Installer components in C#
    A adi rusu

    The message box appears when I click the Cancel button on my form. This is the code inside the overridden Install method: Config config = new Config(); if (config.ShowDialog() == DialogResult.Cancel) throw new InstallException("Installation aborted"); //I think this is why the error message is displayed. base.Install(stateSaver); where Config is the configuration form that I created. Can you tell me how to use SavedState and IDictionary to pass OK or Cancel to the custom action?

    C# help workspace csharp javascript tools

  • Installer components in C#
    A adi rusu

    Hi, I need some help with an installer component. In the Install method I open a configuration form that I created which returns OK or Cancel as dialog results. I found on some site that if I want to cancel the installation, I have to throw an InstallException. At first, the setup wizard displayed a message box saying about an error with the code 2869. I don't really think there is any difference in the source code, but now I get the same message box, followed by another message box with no message. Do I need to install some service pack that supports cancelling the installation? Or does anyone know another way? A site with a tutorial for installer components would also be helpful (google didn't help much, or I didn't use the right keywords) I also tried using a NoImpersonate.js script file with a post build event. Didn't work. I tried running a .bat file containing "msiexec /i pathtofile.msi" with admin privileges. Still 2869. I read that this only happens on Vista ... I managed to get the same error on XP too :)) And yes I am running the setup.exe file, not the msi. Thank you

    C# help workspace csharp javascript tools

  • HDD rotations per minute
    A adi rusu

    Hi, I want to find the "Rotations Per Minute" property of my hard drive using C#. I tried using the "System.Management.ManagementObject" class with the query "SELECT * FROM Win32_DiskDrive". It returned a number of properties, but not the RPM property. I also checked the values of all the properties, in case the RPM property wasn't named "Rotations Per Minute", but none of the values were 7200. Help please ...

    C# csharp database help

  • REPLACE function doesn't always work
    A adi rusu

    I found the problem. In the database I found ’ (ASCII code 22) instead of ' (ASCII code 39) and it seems that writing the results to the file using bcp changes the ’ (22) character with ' (39) :wtf: . It's funny that I don't seem to find ’ (22) on my keyboard ;P . Anyway thanks for your help :)

    Database database tutorial question

  • REPLACE function doesn't always work
    A adi rusu

    Why is ` incorrect? I want to change the ' inside the varchar field because i want to generate an insert command, for example, inside a text file. If i don't change it, the command in the file would be something like this: INSERT INTO some_table VALUES (..., 'Hello, I'm happy to meet you') And my problem is that the string ends right after "I". I also tried doubling the ' character but it didn't work that way either.

    Database database tutorial question

  • REPLACE function doesn't always work
    A adi rusu

    Hi, I'm trying to replace the ' character inside a varchar field with another character (such as `). For example, in the database I have a record of the form "Hello, I'm happy to meet you". I apply the REPLACE function to this record: REPLACE(<table_name>.<field_name>, '''', '`'). Theoretically, the result should be "Hello, I`m happy to meet you". But it's not. The record is not affected by the REPLACE. Does anyone know a logical explanation? Or is this voodoo? :P Thanks

    Database database tutorial question

  • OdbcCommandBuilder for MySQL
    A adi rusu

    I tried not calling GetDeleteCommand(), GetInsertCommand() and GetUpdateCommand() some time ago and it didn't work. How do I check if I'm passing primary key? Should I adapter.Fill() a table and check if there is a primary key? I can do that. I can generate the commands manually too (but I'd like to avoid that). I'm just trying to understand why the same code works just fine on one computer, but it doesn't on another computer with the same operating system and the same database structure. Would you happen to know if on older versions of MySql, the "select * from <table_name>" command doesn't return key column information even if there are keys in the table?

    C# csharp database mysql help question

  • OdbcCommandBuilder for MySQL
    A adi rusu

    The Get{Delete,Insert,Update}Command() methods analyze the select command of the data adapter, and generate OdbcCommand objects according to the data returned by the select command. I've checked their CommandText properties during Debug and they seem ok. If I didn't assign them, the error would be something like "use of unassigned command" or another message, but not the message that I get. If you meant something else by assigning the commands, please give me an example. The problem is not with the code but with the database. I know this because it works on one database but it fails on another database with exactly the same structure but from another computer. Could it be the MySql version? Adrian Junior Developer

    C# csharp database mysql help question

  • OdbcCommandBuilder for MySQL
    A adi rusu

    Nope, I'm pretty sure it's not that. But here's the code anyway. OdbcDataAdapter adapter = new OdbcDataAdapter(); OdbcCommand comm = new OdbcCommand("SELECT * FROM `" + tableName + "`", connection); adapter.SelectCommand = comm; OdbcCommandBuilder builder = new OdbcCommandBuilder(adapter); adapter.DeleteCommand = builder.GetDeleteCommand(); adapter.InsertCommand = builder.GetInsertCommand(); adapter.UpdateCommand = builder.GetUpdateCommand(); I suppose the insert and update commands don't work either but I get the exception when trying to generate the delete command.

    C# csharp database mysql help question

  • OdbcCommandBuilder for MySQL
    A adi rusu

    Hi, From C# I'm using an OdbcCommandBuilder to generate DELETE, INSERT and UPDATE commands for updating a MySQL table and I receive the following error: "Dynamic SQL generation for the DeleteCommand is not supported against a SelectCommand that does not return any key column information." I thought this was because the table had no primary key. But I checked and it does. Does anyone know another reason why I get this error? Thanks

    C# csharp database mysql help question

  • Open a MySQL database from SQL Server
    A adi rusu

    Hi, I'm working in SQL Server 2005 and I'm trying to retrieve some records from a MySQL database using: SELECT * FROM OPENROWSET(provider, connectionString, selectStatement) I used MSDASQL as the provider. Can anyone tell me a good connection string? Thanks

    Database database mysql sql-server sysadmin question

  • Crystal Reports CrossTab fields
    A adi rusu

    Hello Does anyone know how I can access a field from a CrossTab object from code? I can get the CrossTab object with 'myRPTdoc.ReportDefinition.ReportObjects["CrossTab1"]' but what do I do next? Thanks

    C# question

  • Writing text to images
    A adi rusu

    I did that. Here is my code: Font f = new Font("Arial", 48); Bitmap b = new Bitmap("some path"); Graphics g = Graphics.FromImage(b); g.DrawString(textBox.Text, f, Brushes.White, 50, 50); g.Flush(); try { b.Save("result path", ImageFormat.Jpeg); b.Dispose(); b = null; pictureBox.Image = Image.FromFile("result path"); } catch (Exception ex) { MessageBox.Show(ex.Message); //Displays "A generic error occured in GDI+" } I wrote the message on the forum after i tried this code. So Dispose doesn't really work as I had expected. Any other ideas?

    C# graphics question

  • Writing text to images
    A adi rusu

    Hello. I am trying to write the text given by the user onto an image and save the image. If i save it once using the Save method of the Bitmap object, it works. But if i try again, i get an exception because the file is locked. I have to restart the application to save the file again. Does anybody know a solution? Thanks

    C# graphics question

  • Connect to MySQL from C#
    A adi rusu

    Hello! I found on a website that i need the MySQL OleDB Provider to connect to a MySQL database from C#. I installed the provider but i don't know how to use it. Do i have to use OleDbConnection or OdbcConnection? Or is there an easier way? Thank you

    C# csharp database mysql tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups