主题:问个低级的问题~!~!`
SQL语言是不是能用到所有数据库中啊 但今天我看个一位高手的数据库 代码如下
strSQL.Format("INSERT INTO SYS_USER_Info(UserID,UserName,Password,Property,CanHidden,Phone,OfficePhone,Fax,Email,OicqNumber,Msn,PostCode,UserAddress,City,UserJob,JobTitle,UserBirthday,Sex,IDCard,Remark,SerialNumber,ReceiveLimit,CreateTime,RightLevel)\
values('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%d','%d','%s','%d')",userID,name,password,property,hidden,famPhone,offPhone,fax,email,OICQ,MSN,postCode,address,city,job,jtitle,birthday,sex,IDCard,remark,serialNum,recLimit,creTime,rightLevel);
AfxMessageBox(strSQL);
if(user.dbConnection->Execute((LPCTSTR)strSQL,NULL,adCmdText))
{
AfxMessageBox(_T("添加用户成功!"),MB_ICONINFORMATION);
userID=name=password=password=property=hidden=hidden=famPhone=offPhone=offPhone=fax=email=OICQ=MSN=postCode=address=city=job=jtitle=birthday=sex=IDCard=remark=creTime="";//清除所有输入
serialNum=recLimit=rightLevel=0;
UpdateData(false);//变量在控件中显示
}
怎么跟C语言很相似~!~![em18][em18][em18][em18]
strSQL.Format("INSERT INTO SYS_USER_Info(UserID,UserName,Password,Property,CanHidden,Phone,OfficePhone,Fax,Email,OicqNumber,Msn,PostCode,UserAddress,City,UserJob,JobTitle,UserBirthday,Sex,IDCard,Remark,SerialNumber,ReceiveLimit,CreateTime,RightLevel)\
values('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%d','%d','%s','%d')",userID,name,password,property,hidden,famPhone,offPhone,fax,email,OICQ,MSN,postCode,address,city,job,jtitle,birthday,sex,IDCard,remark,serialNum,recLimit,creTime,rightLevel);
AfxMessageBox(strSQL);
if(user.dbConnection->Execute((LPCTSTR)strSQL,NULL,adCmdText))
{
AfxMessageBox(_T("添加用户成功!"),MB_ICONINFORMATION);
userID=name=password=password=property=hidden=hidden=famPhone=offPhone=offPhone=fax=email=OICQ=MSN=postCode=address=city=job=jtitle=birthday=sex=IDCard=remark=creTime="";//清除所有输入
serialNum=recLimit=rightLevel=0;
UpdateData(false);//变量在控件中显示
}
怎么跟C语言很相似~!~![em18][em18][em18][em18]