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
K

kd8341

@kd8341
About
Posts
13
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • timer on webpage
    K kd8341

    Hi, I try to put a timer on my webpage, and my purpose is to trigger an update of certain content of this page. So I "new" a asp.net web application in Visual Studio.net2003 and "drag and drop" a "timer" component from toolbox to the webform. set "interval" to "2000" and "enable" it. But it doesn't works. If I debug it, looks like the timer doesn't run in the normal style. Does anybody encounter this problem before? Is there a better way to make a webpage update periodically by itself? Thanks. Regards Kevin

    ASP.NET csharp asp-net database visual-studio debugging

  • longblob column in MySQL database table
    K kd8341

    I am using DataSet to insert a data row which contains a 6MByte binary file in "Data" column. According to the MySQL manual for 4.0, I define the "Data" column as "longblob", which suppose to store up to 4GByte file. But it just doesn't work. With the exact same code, if my data is less than 100KByte, it works fine. Can anybody tell if I have to config anywhere else to make this work? From MySQL 4.0, the maximum allowed length of LONGBLOB columns depends on the configured maximum packet size in the client/server protocol and available memory. I just wonder what "client/server protocol" refers to? How can I figure out the maximum packet size?

    Database question css database mysql sysadmin

  • "ref" equivalent keyword in C++
    K kd8341

    I am using VC++.net 2003 to access matlab with C API, I have to call a function which is programmed in C#. It looks like VC++.net doesn't like "ref" keyword. >>>>>>>>>>> r = ma.GetMatrix(matname, ref a); /// <--- source code from C# <<<<<<<<<<< "ref" works well in C#, but when I call this function ("GetMatrix") in managed C++, I got an compilation error: >>>>>>>>>>> "cannot covert parameter 2 from 'double __gc[,]' to 'double (__gc *) __gc[,]' <<<<<<<<<<< I am new to VSS.net, could anybody kindly help me if there is "ref" equivalent keyword in C++? Many thanks!

    C / C++ / MFC csharp help c++ json question

  • save BMP to JPG
    K kd8341

    Sorry, I didn't express myself clearly, but I need to convert BMP to JPG in run time(within program). Is there any sample code in Visual studio? Thanks a lot!

    C / C++ / MFC csharp visual-studio tutorial question

  • save BMP to JPG
    K kd8341

    I am using visual studio .net and want to save a BMP file to JPG format. How to do this? Is there a sample code for reference? Thanks.

    C / C++ / MFC csharp visual-studio tutorial question

  • Update an item in MySQL with VS2003
    K kd8341

    I try to use ODBC to update an item in MySQL table "my_status", but it doesn't work. Seems the data can be loaded to the dataset, but how to write it back to the data sourse? Is there anybody can give me some ideas or samples on how to do this? Here is my code: /////connect to the database with DataSet String* strSql = "SELECT * FROM my_status"; OdbcDataAdapter* da = new OdbcDataAdapter(strSql,MYSQLCONN); OdbcCommandBuilder* custCB = new OdbcCommandBuilder(da); OdbcCommand* cmd; cmd = new OdbcCommand("Select * from my_status", MyConn); da->SelectCommand = cmd; DataSet* wrbtDS = new DataSet(); da->Fill(wrbtDS, "my_status"); DataRow* cRow = wrbtDS->Tables->Item["my_status"]->Rows->Item[0]; //// load the image into the dataset String * FILE_NAME = "Solid.jpg"; // for inserting a image file FileStream* fs = new FileStream(FILE_NAME, FileMode::Open, FileAccess::Read); Int16 imglen = (int)fs->Length; Byte buffer[] = new Byte[imglen]; fs->Read(buffer,0,buffer->Length); cRow->Item["image"] = buffer; /* until here the item["image"] is changed and shows in DataSet, but how to update the data source with this updated DataSet??????? The following code doesn't work and how to figure it out?*/ wrbtDS->Tables->Item["my_status"]->Rows->Item[0]->AcceptChanges(); da->Update(wrbtDS, "my_status"); Thanks a lot! Kevin

    Database database mysql architecture tutorial question

  • update image column in MySQL
    K kd8341

    I can update regular column with varchar/numeric type, but I when I try to update image data(longblob) in MySQL, but it doesn't work. Can anybody help me on how to do that? Here is my code for this: ProducerConn->Open(); ProducerSide->CommandText = "DROP TABLE IF EXISTS MyDB"; ProducerSide->ExecuteNonQuery(); ProducerSide->CommandText = "CREATE TABLE MyDB (ID timestamp(14), ext varchar(5), image longblob)"; ProducerSide->ExecuteNonQuery(); String * FILE = "image.jpg"; FileStream * tfs = new FileStream(FILE, FileMode::Open, FileAccess::Read); Int16 len = (int)tfs->Length; Byte buffer[] = new Byte[len]; tfs->Read(buffer, 0, buffer->Length); // ProducerSide->CommandText = "update MyDB set image=buffer"; <---- line with problem ProducerSide->CommandText = "UPDATE MyDB set ext='jpg'"; ProducerSide->ExecuteNonQuery(); Thanks!

    Database help mysql tutorial question announcement

  • insert /retrieve text file into/from MySQL
    K kd8341

    Hi, Davey: Thanks for your response. Here are my code for text file: String * NCFILE_NAME = "test10.nc"; FileStream * tfs = new FileStream(NCFILE_NAME, FileMode::Open, FileAccess::Read); Char ncbuffer[] = new Char[(int)tfs->Length]; tfs->Read(ncbuffer, 0, ncbuffer->Length); My intention is to read the text from "test10.nc" and write to Char Array ncbuffer[], but tfs->Read(ncbuffer, 0, ncbuffer->Length); cause the error like this: cannot convert parameter 1 from '__wchar_t __gc[]' to 'unsigned char __gc[]' When I did exactly the same for binary file, and define as: FileStream* fs = new FileStream(FILE_NAME, FileMode::Open, FileAccess::Read); Byte buffer[] = new Byte[(int)fs->Length]; fs->Read(buffer,0,buffer->Length); String* extension = "jpg"; // for image file It works fine. So I guess maybe I should use something other than FileStream. But what is it? Could you please give me some ideas about this? Regards, Kevin

    Database mysql question

  • insert /retrieve text file into/from MySQL
    K kd8341

    Hi, Davey: Thanks for your response. Here are my code for text file: String * NCFILE_NAME = "test10.nc"; FileStream * tfs = new FileStream(NCFILE_NAME, FileMode::Open, FileAccess::Read); Char ncbuffer[] = new Char[(int)tfs->Length]; tfs->Read(ncbuffer, 0, ncbuffer->Length); My intention is to read the text from "test10.nc" and write to Char Array ncbuffer[], but tfs->Read(ncbuffer, 0, ncbuffer->Length); cause the error like this: cannot convert parameter 1 from '__wchar_t __gc[]' to 'unsigned char __gc[]' When I did exactly the same for binary file, and define as: FileStream* fs = new FileStream(FILE_NAME, FileMode::Open, FileAccess::Read); Byte buffer[] = new Byte[(int)fs->Length]; fs->Read(buffer,0,buffer->Length); String* extension = "jpg"; // for image file It works fine. So I guess maybe I should use something other than FileStream. But what is it? Could you please give me some ideas about this?

    Database mysql question

  • insert /retrieve text file into/from MySQL
    K kd8341

    I have a sample code of insert/retrieve binary file into/from MySQL, it uses FileStream to implement the function. Seems FileStream doesn't work for text file. Can anybody tell what function should I use to retrieve text file from MySQL? Or if you could suggest a sampel code, that will be very helpful. Thanks!

    Database mysql question

  • insert record into mysql table
    K kd8341

    I am a new comer in MySQL area, and I want to build an database application with Visual Studio .net 2003. My questions are: 1. How can I insert records into MySQL table in .net2003? 2. Can MySQL support image data in the record (like JPG/BMP file)? I searched these topics in CP but didn't find answer. Can anybody suggests some articles or sample code about this? Thanks a lot! Kevin

    Database csharp question database mysql visual-studio

  • use ActiveX in C# web application
    K kd8341

    I have a C# web application which need to use an ActiveX in it. I can find some article on ActiveX using C++, I am unable to find a sample of C# call ActiveX. I am not sure if ActiveX only comes with C++? My IDE is Visula studio.net2003. If you have some ideas about this, or some sample code/article, please let me know. Thanks a lot. Kevin

    COM csharp c++ visual-studio com question

  • use ActiveX control in C# web application
    K kd8341

    I have a C# web application which need to use an ActiveX in it. I can find some article on ActiveX using C++, I am unable to find a sample of C# call ActiveX. I am not sure if ActiveX only comes with C++? If you have some ideas about this, or some sample code/article, please let me know. Thanks a lot. Kevin

    Web Development csharp c++ com 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