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
N

navneet professional

@navneet professional
About
Posts
4
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • OS dependency with Interbase database 6.0 driver?
    N navneet professional

    Hi, Could anybody tell me about Interbase database 6.0 driver's compatibility with different OS as (All Windows/Unix/Linux) based on practical experience,not based on information available on internet as it is not always correct. Thanks & Regards Navneet

    Database database linux question

  • How to use CLongBinary to store image of size > 64 KB with Interbase Database 6.0 driver
    N navneet professional

    Hi, I stored/retrieved images upto size 64 KB (65535 byte) using CByteArray.But it is not able to save whole image of size 2 MB, partially it saves upto 64 KB of total size 2 MB. How to use CLongBinary to store image of size > 64 KB (upto 2 MB) with Interbase Database 6.0 driver? Please provide me example specific to this database driver. Database table structure is: Create table "TEST" ( "Name" varchar(10), "BlobData" BLOB ); I tried to check BLOB limit of database table as well.I run following queries on database: Case 1: Create table "TEST" ( "Name" varchar(10), "BlobData" BLOB(65535) ); Result: Successfully created. Case 2: Create table "TEST" ( "Name" varchar(10), "BlobData" BLOB(65536) ); Result: Dynamic SQL Error Error code -842 shown as: unsigned short integer expected. So please help me to resove this problem. Thanks & Regards Navneet

    Database help database tutorial question

  • Problem to store file of size > 64 KB using BLOB in Interbase database
    N navneet professional

    Hi, I am using Interbase 6.0 database. My database table structure is like: Create table "TEST" ( "NAME" VARCHAR(10), "BLOB_DATA" BLOB ) Interbase 6.0 database only supports BLOB for storing images.It don't support LONGBLOB & other datatypes.

    Database database help c++ css wpf

  • Problem to store file of size > 64 KB using BLOB in Interbase database
    N navneet professional

    Hi, I am successfully stored & retrieved image files of size less than 64 KB.But when I am storing a image file of size 3 MB, then there is no error,but it only stores partial data in database. Please refer the code: ------------------------------------------------------------------ 1. File CMyDb.hpp-----> class CMyDb : public CDatabase { public: CMyDb(); virtual ~CMyDb(); virtual void BindParameters( HSTMT hstmt ); BYTE* m_pabImage; // address of the data of the blob int m_nImageLen; // sizeof the data in the image, in bytes CString m_sStmt; // looks like "UPDATE MyTable SET myFld=? WHERE idxFld=123" }; ------------------------------------------------------------------ 2. File CMyDb.cpp-----> CMyDb::CMyDb() { m_pabImage = NULL; m_nImageLen = 0; } CMyDb::~CMyDb() { } void CMyDb::BindParameters( HSTMT hstmt) { SQLINTEGER nLenOrInd= m_nImageLen; SQLRETURN rc; if ( m_sStmt.Find("?") == -1 ) { // no binding needed return; } rc= SQLBindParameter( hstmt, (SQLSMALLINT)1, SQL_PARAM_INPUT, SQL_C_BINARY, SQL_LONGVARCHAR, m_nImageLen, 0, (void*)m_pabImage, m_nImageLen, &nLenOrInd); } ------------------------------------------------------------------ 3. File Main.cpp-> CFile file (sFileName, CFile::modeRead);//|CFile::typeBinary); CFileStatus fileStatus; file.GetStatus(fileStatus); int nCntImgBytes= 3 * 1024 * 1024;//3MB buffer BYTE* pabData = (BYTE*)calloc(nCntImgBytes,sizeof(BYTE)); DWORD lTemp = file.ReadHuge((void*)pabData,fileStatus.m_size); pApp->pServerDatabase->m_pabImage = pabData; pApp->pServerDatabase->m_nImageLen = fileStatus.m_size; pApp->pServerDatabase->m_sStmt= "INSERT INTO TEST1 (\"NAME\" , \"myBlobfield\") VALUES ('2',?)"; pApp->pServerDatabase->ExecuteSQL( pApp->pServerDatabase->m_sStmt ); ------------------------------------------------------------------ Please reply me as soon as possible. Regards Navneet

    Database database help c++ css wpf
  • Login

  • Don't have an account? Register

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