mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
ODBC / MSSQL fixed Invalid precision error
git-svn-id: svn://ultimatepp.org/upp/trunk@1079 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
3050c61a2f
commit
eab57ebcab
3 changed files with 10 additions and 4 deletions
|
|
@ -100,4 +100,4 @@ md])&]
|
|||
[s2;%% Runs process defined by [%-*@3 cmd] command line. If [%-*@3 cmd]
|
||||
was executed successfully and returned zero exit code, returns
|
||||
its standard output, otherwise returns String`::GetVoid().&]
|
||||
[s3;%% ]
|
||||
[s0; ]
|
||||
|
|
@ -327,8 +327,14 @@ bool ODBCConnection::Execute()
|
|||
param.Clear();
|
||||
for(int i = 0; i < bparam.GetCount(); i++) {
|
||||
Param& p = bparam[i];
|
||||
if(!IsOk(SQLBindParameter(session->hstmt, i + 1, SQL_PARAM_INPUT, p.ctype, p.sqltype,
|
||||
p.data.GetCount(), 0, (SQLPOINTER)~p.data, p.data.GetLength(),
|
||||
SQLSMALLINT DataType;
|
||||
SQLULEN ParameterSize;
|
||||
SQLSMALLINT DecimalDigits;
|
||||
SQLSMALLINT Nullable;
|
||||
if(!IsOk(SQLDescribeParam(session->hstmt, i + 1, &DataType, &ParameterSize, &DecimalDigits, &Nullable)))
|
||||
return false;
|
||||
if(!IsOk(SQLBindParameter(session->hstmt, i + 1, SQL_PARAM_INPUT, p.ctype, DataType,
|
||||
ParameterSize, DecimalDigits, (SQLPOINTER)~p.data, p.data.GetLength(),
|
||||
&p.li)))
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ SqlSet operator&(const SqlSet& s1, const SqlSet& s2) {
|
|||
SqlSet operator-(const SqlSet& s1, const SqlSet& s2) {
|
||||
if(s1.IsEmpty() || s2.IsEmpty())
|
||||
return s1;
|
||||
return SqlSet(s1() + " minus " + s2(), SqlSet::SETOP);
|
||||
return SqlSet(s1() + SqlCase(MSSQL, " except ")(" minus ") + s2(), SqlSet::SETOP);
|
||||
}
|
||||
|
||||
String SqlSet::operator~() const {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue