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

nibabug

@nibabug
About
Posts
21
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • a problem about datatype
    N nibabug

    thanks , but it can not be reduced

    wuhuaiji

    Database help question

  • how to see source file of system function
    N nibabug

    like avg(),sum(),and so on i would like to see the source files where exist these files? thanks a lot:-D

    wuhuaiji

    Database tutorial question

  • a problem about datatype
    N nibabug

    hello everyone :) i define a datatype float, but when i write a value, for exsample '1.123',to the table, then i find that the value in the table changed to '1.123999999999999', what's the problem? thanks a lot :-D

    wuhuaiji

    Database help question

  • how to write and use my function
    N nibabug

    i have a problem, that i want to write a function like avg(),count()..... but the parameter i want to pass to the function is a row-name, for exsample: i have a table, which includes 1000 values of temperature, i want to calculate the variance of all the 1000 values.

    wuhuaiji

    Database help tutorial

  • how to draw a dynamic curve
    N nibabug

    thanks a lot first, i am a newbie, ;P then, i just want draw a curve, which can move now i have got many friends' help, thanks for all of your answer and i think maybe i have found the solution indeed, the question is a little problem, the big problem is that i am fresh in VC

    wuhuaiji

    C / C++ / MFC database tutorial

  • how to draw a dynamic curve
    N nibabug

    thanks i have googled, and now i know how to draw a static curve but i want to draw a dynamic curve, which can move smoothly with time going

    wuhuaiji

    C / C++ / MFC database tutorial

  • how to draw a dynamic curve
    N nibabug

    hello thanks for your answer my problem is, how to make the curve move smoothly? it move from right to left with time going

    wuhuaiji

    C / C++ / MFC database tutorial

  • how to draw a dynamic curve
    N nibabug

    i want to lern to draw a dynamic curve,but do not know how to do; is there any good Activecontrol or methode, my idea is, continuesly get data from a database or by some way else, then draw them on a picture, the curve should be dynamic. thanks a lot

    wuhuaiji

    C / C++ / MFC database tutorial

  • how to update table after query
    N nibabug

    thanks a lot:)

    wuhuaiji

    Database database tutorial announcement

  • how to update table after query
    N nibabug

    i write like this: SELECT * FROM TB_ANGEL ORDER BY angel ASC but i want not only query by order, i also want update the table by order thanks a lot:)

    wuhuaiji

    Database database tutorial announcement

  • a problem about AllocSysString()
    N nibabug

    when i do write the following: m_pRecordset->Open("CREATE TABLE MY10151109(ID INT,Hex_Fangwei TEXT,Hex_FuYang TEXT,Hex_QingXie TEXT)", theApp.m_pConnection.GetInterfacePtr(), adOpenDynamic, adLockOptimistic, adCmdText); it runs OK; but when i do it like this: CString mstr; mstr.Format("CREATE TABLE '%s'(ID INT,Hex_Fangwei TEXT,Hex_FuYang TEXT,Hex_QingXie TEXT)",TB_Name); m_pRecordset->Open(mstr.AllocSysString(), theApp.m_pConnection.GetInterfacePtr(), adOpenDynamic, adLockOptimistic, adCmdText); appear runtime error who could tell me why , and what should i do?

    wuhuaiji

    C / C++ / MFC help question

  • a problem about stackoverflow
    N nibabug

    excuse me but i have found that when i do nothing to the database in a WM_TIMER function, there is no error, but just if i do something, for example: void CSerialRecieveDlg::OnTimer(UINT nIDEvent){ CString str; CCreateName Dlg; CString TB_Name; TB_Name=Dlg.m_TableName; str.Format("SELECT * FROM "); str+=TB_Name; try { //先关闭已经打开的记录集对象 m_pRecordset->Close(); //根据新的Sql查询语句,重新打开记录集对象 m_pRecordset->Open(str.AllocSysString(), theApp.m_pConnection.GetInterfacePtr(), adOpenDynamic, adLockOptimistic, adCmdText); } catch(_com_error *e) { AfxMessageBox(e->ErrorMessage()); } m_pRecordset->MoveNext(); CDialog::OnTimer(nIDEvent); } there is a runtime error, The problem is that i do not know it is a database problem or a C++ problem??

    wuhuaiji

    Database help question database

  • a problem about stackoverflow
    N nibabug

    thanks a lot:)

    wuhuaiji

    Database help question database

  • a problem about stackoverflow
    N nibabug

    thanks a lot:)

    wuhuaiji

    C / C++ / MFC help question database debugging

  • a problem about stackoverflow
    N nibabug

    it has no businiss with the timer, because when i change it to 2second, it also appear error: (step debug) unhandled exception in SerialRecieve.exe(KERNEL32.DLL):0xE06D7363:Microsoft C++ EXCEPTION no matter where the error appears, it appears always in the CSerialRecieveDlg::OnTimer(UINT nIDEvent)

    wuhuaiji

    C / C++ / MFC help question database debugging

  • a problem about stackoverflow
    N nibabug

    get data from three different tables , and then do something , and then show them, look the flowing: void CSerialRecieveDlg::OnTimer(UINT nIDEvent) { // TODO: Add your message handler code here and/or call default CString strSql; // int m=atoi(m_strNum); _variant_t var; CString str,strnum; CString strSendFW,strSendFY,strSendQX; CString strSend; str=""; SQLNum++; if(SQLNum==130) SQLNum-=129; strSql.Format("%d",SQLNum); strnum=strSql; strSql.Format("SELECT * FROM TB_FANGWEI WHERE ID = '%s'",strnum); try { //先关闭已经打开的记录集对象 m_pRecordset->Close(); //根据新的Sql查询语句,重新打开记录集对象 m_pRecordset->Open(strSql.AllocSysString(), theApp.m_pConnection.GetInterfacePtr(), adOpenDynamic, adLockOptimistic, adCmdText); } catch(_com_error *e) { AfxMessageBox(e->ErrorMessage()); } //在ADO操作中建议语句中要常用try...catch()来捕获错误信息, //因为它有时会经常出现一些想不到的错误。 var = m_pRecordset->GetCollect("Value"); if(var.vt != VT_NULL) str = (LPCSTR)_bstr_t(var); m_strAGFW=str; var = m_pRecordset->GetCollect("HexValue"); if(var.vt != VT_NULL) str = (LPCSTR)_bstr_t(var); strSendFW=str; // char* pszTest = (char*)(LPCTSTR)strSendFW; // unsigned char* ptr=(unsigned char*)pszTest; // unsigned char uchartemp; // unsigned char m=4; unsigned int intFW=(unsigned int)_tcstoul(strSendFW, 0, 16); intFW&=0x3fff; intFW<<=2; intFW|=0x0000; strSql.Format("SELECT * FROM TB_FUYANG WHERE ID = '%s'",strnum); try { //先关闭已经打开的记录集对象 m_pRecordset->Close(); //根据新的Sql查询语句,重新打开记录集对象 m_pRecordset->Open(strSql.AllocSysString(), theApp.m_pConnection.GetInterfacePtr(), adOpenDynamic, adLockOptimistic, adCmdText); } catch(_com_error *e) { AfxMessageBox(e->Err

    C / C++ / MFC help question database debugging

  • a problem about stackoverflow
    N nibabug

    void CSerialRecieveDlg::OnBtnAutosend() { // TODO: Add your control notification handler code here if(!m_ctrlMSCommCOM1.GetPortOpen()) AfxMessageBox("please open the port!"); else { CCreateName Dlg; CString TB_Name; CString mstr; if(Dlg.DoModal()==IDOK) { TB_Name=Dlg.m_TableName; } m_pRecordset->Close(); //// create a new table in SQL mstr.Format("IF NOT EXISTS (SELECT * FROM sysobjects WHERE name = '"); mstr+=TB_Name; mstr+="') CREATE TABLE "; mstr+=TB_Name; mstr+=" (ID INT,FangWei TEXT,FuYang TEXT,QingXie TEXT)"; try { m_pRecordset->Open(mstr.AllocSysString theApp.m_pConnection.GetInterfacePtr(), adOpenDynamic, adLockOptimistic, adCmdText); } catch(_com_error *e) { AfxMessageBox(e->ErrorMessage()); } SetTimer(1,500,NULL); } } when debug to the end, appear an error about "stackoverflow" what is the problem??

    wuhuaiji

    C / C++ / MFC help question database debugging

  • a problem about stackoverflow
    N nibabug

    void CSerialRecieveDlg::OnBtnAutosend() { // TODO: Add your control notification handler code here if(!m_ctrlMSCommCOM1.GetPortOpen()) AfxMessageBox("please open the port!"); else { CCreateName Dlg; CString TB_Name; CString mstr; if(Dlg.DoModal()==IDOK) { TB_Name=Dlg.m_TableName; } m_pRecordset->Close(); //// create a new table in SQL mstr.Format("IF NOT EXISTS (SELECT * FROM sysobjects WHERE name = '"); mstr+=TB_Name; mstr+="') CREATE TABLE "; mstr+=TB_Name; mstr+=" (ID INT,FangWei TEXT,FuYang TEXT,QingXie TEXT)"; try { m_pRecordset->Open(mstr.AllocSysString theApp.m_pConnection.GetInterfacePtr(), adOpenDynamic, adLockOptimistic, adCmdText); } catch(_com_error *e) { AfxMessageBox(e->ErrorMessage()); } SetTimer(1,500,NULL); } } when dibug to the end, appear an ERROR about "stackoverflow" what is the problem??

    wuhuaiji

    Database help question database

  • How to query all of the tab_name in the same database
    N nibabug

    firstly thanks again, by the way,i am so sorry, that i do not really understand what you write above, and i do not know in VC++ , how to create a table, just like the question i write "a problem about m_pConnection->Execute", have you a good way to resolve it, or can can you tell me which problem exist in my program

    wuhuaiji

    Database database c++ help tutorial

  • a problem about m_pConnection->Execute
    N nibabug

    str+="CREATE TABLE "; str+=m_TableName; str+="(ID INTEGER,FangWei TEXT,FuYang TEXT,QingXie TEXT)"; try{ m_pConnection->Execute(str.AllocSysString(),&RecordsAffected,adCmdText); } when debug to here, the following appear: Unhandled exception in SerialRecieve.exe(KERNEL32.DLL):0xE06D7363:Microsoft C++ Exception. str is a CString variable,which is the table name, the program passed the compile and the build, but when debug, it can not go through. maybe it is a easy problem, but i can not resolve it help me please! thanks a lot!

    wuhuaiji

    Database help c++ debugging
  • Login

  • Don't have an account? Register

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