Home > Software engineering >  Please help!!!!! Please help!!!!! ADO connection Access to the address of the image data format into
Please help!!!!! Please help!!!!! ADO connection Access to the address of the image data format into

Time:09-20

 bool CAccessManager: : CreateTimeTable (CString& SOutTime, cstrings sInFolder) 
{
CDaoAccess _Access;
M_sAccessPath=sInFolder;
SYSTEMTIME st.
GetLocalTime (& amp; St);
D_ d_ sOutTime. The Format (" % % % d ", st. wYear, st. wMonth, st. wDay);

_Access. CreatAccessDB (sInFolder);
Cstrings strSql;
StrSql. The Format (" CREATE TABLE % s (ID AUTOINCREMENT PRIMARY KEY, time VARCHAR (200), the template type VARCHAR (200), the identification results VARCHAR (200), image address TEXT) ", sOutTime);

//create a table;
_Access. CmdSql (sInFolder, strSql);//CreateAccess (outExcel, sPath);


StrSql. The Format (" ALTER TABLE 2019 _2_12 ALTER the COLUMN picture address the Hyperlink ");

//create a table;
_Access. CmdSql (sInFolder, strSql);//CreateAccess (outExcel, sPath);


M_sCurTable=sOutTime;
return true;
}
}



CodePudding user response:

Increase file:///before field values

CodePudding user response:

StrSql. The Format (TEXT (" ALTER TABLE 2019 _2_12 ALTER COLUMN % s ",... );
String format??

CodePudding user response:

reference 1st floor of schrodinger cat replies:
before the field values increase file:///
add hyperlinks in the database

CodePudding user response:

refer to the second floor 7-eleven's response:
strSql. The Format (TEXT (" ALTER TABLE 2019 _2_12 ALTER COLUMN % s ",... );
String format??
that sentence is want to address that a list of the pictures to the Hyperlink links data types but run failed write wrong to ignore this sum up

CodePudding user response:

for data programming using Microsoft Access 2010



CodePudding user response:

CDaoTableDef: : CreateField dbMemo
CDaoTableDef: : SetAttributes dbHyperlinkField

CodePudding user response:

ADO is
ADOX: : ColumnsPtr pCols=pTable - & gt; The Columns;
.
PCols - & gt; Append (_T (" RecordID "), and ADOX: : adInteger, 0).//automatic numbering field
PCols - & gt; Append (_T (" PicUrl "), and ADOX: : adLongVarWChar, 2048);//
.
PCatalog - & gt; Tables - & gt; The Refresh ();
PCols - & gt; The GetItem (I) - & gt; ParentCatalog=pCatalog
ADOX: : PropertiesPtr pProperties=pCols - & gt; The GetItem (I) - & gt; Properties;
PCols - & gt; The GetItem (_T (" RecordID ")) - & gt; The Properties - & gt; The GetItem (_T (" AutoIncrement ")) - & gt; Value=https://bbs.csdn.net/topics/true;//automatic numbering
PCols - & gt; The GetItem (_T (" PicUrl ")) - & gt; The Properties - & gt; The GetItem (_T (" Jet OLEDB: the Hyperlink ")) - & gt; Value=https://bbs.csdn.net/topics/true;//hyperlink

CodePudding user response:

The font color to blue when + underlined
Program to save the record corresponding links,
Click event invocation: shellexecute (null, "open", "http://abc.com", 0, 0) or local chain address shellexecute (null, "open", "file:///c:\a.docx", 0, 0)
  • Related