|
|
Comments and Discussions
|
|
 |
|

|
hi
can anybody help me im working on device appliction i am facing the problem to insert value into database problem is when i insert value from the emulator the insret code is working fine and return 1 in executenonquery() but when i select data from database then i dont found any data in it and when i insert data directly into database using query its inserted and also view in emulator wnen application is run.
i can not understand what is the problem so plz help me to solve this problem.
|
|
|
|

|
hi author and friends,
this code help me save lots of time, thanks hackzai
have anyone covered DisconnectDB problem in SqlSvrCe.cpp?
ConnectDB(L"MYDB.SDF");
//success..
DisconnectDB(L"MYDB.SDF);
//seems success (but not actually)
ConnectDB(L"MYDB.SDF");
//fail.. (even when u try to connect MYDB.SDF with query analyser, fails again)
SqlCe do not support more than one processes accessing a sdf file, so this is a fault of DisconnectDB
im connecting the database via remote api, so using a device side dll. everything ok except this problem (every thing ok, but can connect to the sdf just for once at each activesync session, only way to release that connection is disconnecting from activesync
something here keeps process connected to the sdf
have any idea??
thanks everyone
regards
Ender Karadag
|
|
|
|

|
What i have to do to know whether a table exists or not.
|
|
|
|

|
Hi,
While executing select * from table_name where ColName='abc' query, it returns error code 0x80040e14. ColName type is nText.
But if the data type of ColName is Numeric, the query executes successfully and gives correct rows. PLease let me know how can i solve this issue?
Thanks,
Sanjay
|
|
|
|

|
hi
when i am compiling this demo(mysqlce.cpp)
then i am getting error like
Error 1 error LNK2005: "struct IDBInitialize * pIDBInitialize" (?pIDBInitialize@@3PAUIDBInitialize@@A) already defined in MySqlCe.obj SqlSvrCe.obj
Error 2 error LNK2005: "struct IUnknown * pIUnknownSession" (?pIUnknownSession@@3PAUIUnknown@@A) already defined in MySqlCe.obj SqlSvrCe.obj
Error 3 error LNK2005: "struct IDBCreateSession * pIDBCreateSession" (?pIDBCreateSession@@3PAUIDBCreateSession@@A) already defined in MySqlCe.obj SqlSvrCe.obj
Error 4 error LNK2005: "struct IDBProperties * pIDBProperties" (?pIDBProperties@@3PAUIDBProperties@@A) already defined in MySqlCe.obj SqlSvrCe.obj
Error 5 error LNK2005: "struct IDBCreateCommand * pIDBCrtCmd" (?pIDBCrtCmd@@3PAUIDBCreateCommand@@A) already defined in MySqlCe.obj SqlSvrCe.obj
Error 6 error LNK2005: "struct ICommandText * pICmdText" (?pICmdText@@3PAUICommandText@@A) already defined in MySqlCe.obj SqlSvrCe.obj
Error 7 fatal error LNK1169: one or more multiply defined symbols found Pocket PC 2003
can anybody tell me where i am going wrong
thanx
|
|
|
|

|
Hi all
I am developing windows mobile 6.0 application using sql server compact edition in desktop.database file is created but it is not showing on my disk.someone told me it will store in emulator file system. but i am not able to access emulator file system
I am worried that whether it is create or not.
I have to insert data in table that is created in file and retrive data from table.
I am using OLE DB provider
so plz help me
thanx
|
|
|
|

|
Dear all
I am new to sql ce programming..beg ur pardon for asking stupid question....
after doing some searching..I finally can run the two demo project well...
but these two project can only create and drop table,column.....for me
and I had spent a lot of time trying to insert data into table....
I am wondering if there is anyone can show me a sample to teach me how to use
ExecuteSQL(),
what I am trying is
create table data,and create column ID,then the InsertExecutionLog function is like the following...
HRESULT InsertExecutionLog(CExecutionLog *execLog)
{
HRESULT hr = S_OK;
CString strSQL;
strSQL.Format(L"Insert Into data(ID) Values('%d')",execLog->SiteNo);
hr = ExecuteSQL((LPTSTR)(LPCTSTR)strSQL);
return hr;
}
can anyone tell me what's wrong with code.....
please ..and thanks in advance,especially for the author's effort.....
|
|
|
|

|
When I give random Search of 1000 records in particular db, the systems hangs after some 30 to 40 searches. Is there a Memory Problem. I use the Process Rowset function and retreived.
|
|
|
|

|
The code is compiled without errors but at the point of Database creation its throwing error "User Breakpoint called from code at 0x7c901230".
The error is thrown at the exection of the code :
hr = pIDBDataSourceAdmin->CreateDataSource(1,dbpropset,NULL,IID_IDBProperties, NULL);
Kindly provide with the solution to overcome the problem.
Thanks in advance.
Regards,
Bose.
|
|
|
|

|
Dear All,
Im new to SQL CE DB.We are using SQl CE 2.0 version
I tried to connect the DB from my application which i developed in eVC++ 3.0 environment. For this i tried with the sample program provided by the MSDN in the following link
and the code
hr = CoCreateInstance(CLSID_SQLSERVERCE_2_0, NULL, CLSCTX_INPROC_SERVER,
IID_IDBDataSourceAdmin, (void**)(& pIDBDataSourceAdmin));
But return value is negative so i cant proceed further. Could any one of you help me in what went wrong.
Regards
Bose
|
|
|
|

|
hi
make sure u have installed sql server compact edition v2.0
otherwise try to implement it on new project .do not run sample code just copy cocreateinstance() in your new project it will work
thanx
|
|
|
|

|
Your sample saved me a day of work for sure, hassling around with the "Nordwind OLEDB Sample Application". IOU.
Michael W. Folz
MWFolz S/C
|
|
|
|

|
Help please! Wy it causes exception in line
label1.Text = (string)objectRS.Fields[1].Value;
-------------------------------------------
Object one = new Object();
ADOCE.Connection objectConn = new ADOCE.Connection();
objectConn.Open("\\My documents\\db.cdb", "", "", 0);
string sSql = "SELECT sRus FROM Translator2 WHERE sEng = '" + textBox1.Text.ToString() + "'";
ADOCE.Recordset objectRS = new ADOCE.Recordset();
objectRS = objectConn.Execute(sSql, out one, 1);
while (objectRS.EOF != true)
{
label1.Text = (string)objectRS.Fields[1].Value;
objectRS.MoveNext();
}
-----------------------------------------------------------------------
Table: Translator2
Three columns: intID, sRus, sEng. Not null. For example:
1
Привет
Hello
Made in Access 2000 and converted in Pocket Access.
|
|
|
|

|
Hello
I and need some help to deploy this under VS 2005 - if this is possible at all...
Can you help me please?
Cheers
Alex
|
|
|
|

|
hackzai great article.
Do you have an example of how to update a row's binary field?
Thanks.
|
|
|
|

|
How can i create a AuthPwd for a new Database in code?
this should be implemented in CreateDB function.
|
|
|
|

|
Hi,
You have to create another 2 arrays of DBPROP under the ConnectDB() & CreateDB() method. The new properties ID (dwPropertyID) are:
DBPROP_AUTH_PASSWORD
For detail, please refer to :-
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/oledb/htm/oledbdbprop_auth_password.asp
DBPROP_AUTH_USERID
For detail, please refer to :-
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/oledb/htm/oledbdbprop_auth_userid.asp
Happy Coding ~
regards,
hackzai
HACKZAI~ YOUR BUSINESS NEED, OUR CUSTOM MADE
|
|
|
|

|
i've add the code, but seems it doesn't changed anything. If i connect my database via QueryAnalyzer no Password is needed.
Look here:
HRESULT CDBSQL001::CreateDB (LPTSTR lpszDBName)
{
// PURPOSE:
// - Create a new SQL Server CE Database with the given name
// PARAMETERS:
// - lpszDBName :: SQL Server CE Database filename in fullpath
// OPERATION:
// - ...
// RETURN VALUE:
// - HRESULT
HRESULT hr = NOERROR;
DBPROPSET dbpropset[1]; // Property Set used to initialize provider
DBPROP dbprop[3]; // property array used in property set to initialize provider
IDBDataSourceAdmin *pIDBDataSourceAdmin = NULL;
// Create the SQL Server CE provider
hr = CreateSqlSvrCeProvider();
// Validation
if(FAILED(hr))
goto CleanExit;
// Initialize...
VariantInit(&dbprop[0].vValue);
// Initialize a property with name of database
dbprop[0].dwPropertyID = DBPROP_INIT_DATASOURCE;
dbprop[0].dwOptions = DBPROPOPTIONS_REQUIRED;
dbprop[0].vValue.vt = VT_BSTR;
dbprop[0].vValue.bstrVal = SysAllocString(lpszDBName);
// Initialize...
VariantInit(&dbprop[1].vValue);
// Initialize a property with name of database
dbprop[1].dwPropertyID = DBPROP_AUTH_PASSWORD;
dbprop[1].dwOptions = DBPROPOPTIONS_REQUIRED;
dbprop[1].vValue.vt = VT_BSTR;
dbprop[1].vValue.bstrVal = SysAllocString(L"test");
// Initialize...
VariantInit(&dbprop[2].vValue);
// Initialize a property with name of database
dbprop[2].dwPropertyID = DBPROP_AUTH_USERID;
dbprop[2].dwOptions = DBPROPOPTIONS_REQUIRED;
dbprop[2].vValue.vt = VT_BSTR;
dbprop[2].vValue.bstrVal = SysAllocString(L"Admin");
// Validation
if(NULL == dbprop[0].vValue.bstrVal)
{
// Set return value
hr = E_OUTOFMEMORY;
goto CleanExit;
}
// Initialize the property set
dbpropset[0].guidPropertySet = DBPROPSET_DBINIT;
dbpropset[0].rgProperties = dbprop;
dbpropset[0].cProperties = sizeof(dbprop)/(sizeof(dbprop[0]));
// Query the IDBDataSourceAdmin interface
hr = pIDBInitialize->QueryInterface(IID_IDBDataSourceAdmin,
(void **)&pIDBDataSourceAdmin);
// Validation
if(FAILED(hr))
goto CleanExit;
else
pIDBInitialize->AddRef();
// Create the given database...
hr = pIDBDataSourceAdmin->CreateDataSource(1,
dbpropset,
NULL,
IID_IDBProperties,
NULL);
// Validation
if(FAILED(hr))
// Clean the memory...
goto CleanExit;
// Free the used memory
SysFreeString(dbprop[0].vValue.bstrVal);
// Free the used memory
SysFreeString(dbprop[1].vValue.bstrVal);
// Free the used memory
SysFreeString(dbprop[2].vValue.bstrVal);
// Create new database session...
hr = CreateDBSession();
CleanExit:
// Release the used memory
VariantClear(&dbprop[0].vValue);
// Release the used memory
VariantClear(&dbprop[1].vValue);
// Release the used memory
VariantClear(&dbprop[2].vValue);
// Release the OLE DB interface
if(NULL != pIDBDataSourceAdmin)
{
pIDBDataSourceAdmin->Release();
pIDBDataSourceAdmin = NULL;
}
// Only execute the following command when either one of the
// above command fail.
if (FAILED(hr))
// Disconnect the database/reset the OLE DB variable
DisconnectDB(lpszDBName);
return hr;
}
What do i wrong? Thanks for any help.
Your examples are amazing.
Greets, Rio.
|
|
|
|
|

|
Hi:
I'm developing an sample application using this code to learn how SQL CE works. Now, I can create a database, execute SQL, etc. My application has a button that execute the follow code (the database exists):
ConnectDB(L"\\My Documents\\db.sdf");
ExecuteSQL(L"SELECT * FROM table");
DisconnectDB(L"\\My Documents\\db.sdf");
ShowInformation();
Only the first time I click the button it works OK. If I try another time ConnectDB fails. It seems Disconnect rutine doesn't work correctly.
Thanks in advance.
|
|
|
|

|
i am developing a pocket pc application but i am not able to create a connection with sql ce cann u suggest me how u were able to create the connection.plzzzzzzzz
sunny
|
|
|
|
|

|
Hi,
The SqlServerSelfTest() function was calling the CreateSqlSvrCeProvider() function; which will instantiate the SQLCE component by execute the CoCreateInstance API. The different between the SQL CE v1.0 & SQL CE v2.0 is the first arguement, ie:
Demo#1
CoCreateInstance(CLSID_SQLSERVERCE_1_0,
0,
CLSCTX_INPROC_SERVER,
IID_IDBInitialize,
(void**)&pIDBInitialize);
Demo#2
CoCreateInstance(CLSID_SQLSERVERCE_2_0,
0,
CLSCTX_INPROC_SERVER,
IID_IDBInitialize,
(void**)&pIDBInitialize);
So, depends on which version of SQLCE you have installed, then you are require to change this parameter accordingly.
HACKZAI~ YOUR BUSINESS NEED, OUR CUSTOM MADE
|
|
|
|

|
OK, thanks, it works with this
It's very difficult to use SqlServerCe with Embedded visual C++4.0. There is no many choice.
Thanks for this good sample
|
|
|
|

|
Hi K-PAx,
first of all,I appreciate... ur work. This kind of application is really helpful to many people like me.
Let me tell u what i am trying for.
I want to create a small database and insert some information and retrieve the same information back.I want this to be done using EVC 4,SQLCE 2.0 and PockePC 2003 Emulator using OLEDB.
when i tried ur sample i got the following errors.
*************************************************************************
SqlSvrCe.obj : error LNK2005: "struct ICommandText * pICmdText" (?pICmdText@@3PAUICommandText@@A) already defined in MySqlCe.obj
SqlSvrCe.obj : error LNK2005: "struct IDBCreateCommand * pIDBCrtCmd" (?pIDBCrtCmd@@3PAUIDBCreateCommand@@A) already defined in MySqlCe.obj
SqlSvrCe.obj : error LNK2005: "struct IDBProperties * pIDBProperties" (?pIDBProperties@@3PAUIDBProperties@@A) already defined in MySqlCe.obj
SqlSvrCe.obj : error LNK2005: "struct IDBCreateSession * pIDBCreateSession" (?pIDBCreateSession@@3PAUIDBCreateSession@@A) already defined in MySqlCe.obj
SqlSvrCe.obj : error LNK2005: "struct IUnknown * pIUnknownSession" (?pIUnknownSession@@3PAUIUnknown@@A) already defined in MySqlCe.obj
SqlSvrCe.obj : error LNK2005: "struct IDBInitialize * pIDBInitialize" (?pIDBInitialize@@3PAUIDBInitialize@@A) already defined in MySqlCe.obj
emulatorDbg/MySqlCe.exe : fatal error LNK1169: one or more multiply defined symbols found
**************************************************************************
i have updated the file "ssceoledb.h" by downloading the file fromthe net. I will be thankful to u if u can help in compiling and running this smaple.
I have also tried to execute the sample "NorthWindOleDb" that comes with sqlce 2.0.After lot of trials i could compile the project. But not able to run it on pocketpc 2003 emulator as i am getting problem at the following line of code.
hr = CoCreateInstance(CLSID_SQLSERVERCE_2_0,0,CLSCTX_INPROC_SERVER,IID_IDBInitialize,void**)&pIDBInitialize);
can u help me in solving these problems and make my application on the target platform that i specified.
thanks a lot.
Krishna.
|
|
|
|

|
You can fix this error by adding /FORCE:MULTIPLE to your project options.
|
|
|
|

|
I am trying to use SQL Server CE.
I would like to know something more about it; in fact, I have got some problem I think regarding connection and disconnection. In particular, when I try to connect a second time to the db, after having already executed disconnectDB a first time, I do not succeed. The reason why I cannot find a solution is that I do not well understand how the function AddRef() and Release() work.
Could you please explain me how they work and when the number of references to an object can increase thanks to a call to a function different from AddRef(). I think maybe it could be tha case of the QueryInterface() function.
Thanks for your help.
p.s. is it possible to find on the Internet other examples of use (in c/c++) of SQL Server CE?
|
|
|
|

|
I got exactly the same problem.
If someone knows how to fix it, please help us!
|
|
|
|

|
hello.
i've found a solution to the problem. there's an error in the DisconnectDB function in SqlSvrCe.cpp
here there's the correct function
HRESULT DisconnectDB (LPTSTR lpszDBName)
{
// PURPOSE:
// - Disconnect from the given SQL Server CE Database
// PARAMETERS:
// - lpszDBName :: SQL Server CE Database filename in fullpath
// OPERATION:
// - ...
// RETURN VALUE:
// - HRESULT
if(NULL != pIDBCreateSession)
{
pIDBCreateSession->Release();
pIDBCreateSession = NULL;
}
if(NULL != pICmdText)
{
pICmdText->Release();
pICmdText = NULL;
}
if(NULL != pIUnknownSession)
{
pIUnknownSession->Release();
pIUnknownSession->Release();
pIUnknownSession = NULL;
}
if(NULL != pIDBProperties)
{
pIDBProperties->Release();
pIDBProperties = NULL;
}
if(NULL != pIDBCrtCmd)
{
pIDBCrtCmd->Release();
pIDBCrtCmd = NULL;
}
// Release interfaces
if(NULL != pIDBInitialize)
{
pIDBInitialize->Release();
pIDBInitialize->Release();
pIDBInitialize = NULL;
}
return S_OK;
}
Luca
|
|
|
|

|
Why double commands?
pIUnknownSession->Release();
pIUnknownSession->Release();
pIDBInitialize->Release();
pIDBInitialize->Release();
i don't think, whether this solved the problem.
|
|
|
|

|
Hello Joao,
I created a new project called Teste2BD based on your article. I´ getting success opening my database and the session, but when I try to execute a single query calling "hr = m_cmdLocal.Open(g_oleDbSession,strngQuery,&propSetCmd)"
the following error message appears (I´m running EVC4 on a Intermec 700 Series Pocket PC 2003 Device in Debug mode):
First-change exception in Teste2BD.exe: 0x0C0000005: Access violation
Here follows the function where this error occurs:
void ModuloDados::ExecutaQueryLocal(SysString strngQuery)
{
CDBPropSet propSetCmd(DBPROPSET_ROWSET);
HRESULT hr;
nRowsLocal=0;
nRowLocalAtual=1;
//
// Close the command
//
m_cmdLocal.Close();
//
// Use a scrollable cursor
//
propSetCmd.AddProperty(DBPROP_BOOKMARKS, true );
propSetCmd.AddProperty(DBPROP_OWNUPDATEDELETE, false );
propSetCmd.AddProperty(DBPROP_OWNINSERT, false );
propSetCmd.AddProperty(DBPROP_OTHERUPDATEDELETE, false );
propSetCmd.AddProperty(DBPROP_OTHERINSERT, false );
propSetCmd.AddProperty(DBPROP_CANFETCHBACKWARDS, true );
propSetCmd.AddProperty(DBPROP_QUICKRESTART, true );
//
// Open the command
//
hr = m_cmdLocal.Open(g_oleDbSession,strngQuery,&propSetCmd);
if(hr == S_OK)
{
m_cmdLocal.MoveFirst(); // Position the cursor
hr = m_cmdLocal.GetRecordCount(&nRowsLocal); // Retrieve the row count
}
}
Thanks.
Marcio Camargo Oliveira
Brazil
|
|
|
|

|
Hi,
I'm facing the same problem as mentioned in your post.
Code:
BOOL CPollclient_central1Dlg::OnInitDialog(){
...
hr = m_SQLdatabase.Open(TEXT(DB_PATH));
if(FAILED(hr)){
CDialog::EndDialog(IDCANCEL);
return FALSE;
}
}
When the application exits I get a message box saying "First chance exception in pollclient_central1.exe: 0x0C0000005: Access Violation"
Please help me if you have found the solution.
Thanks
SPA
|
|
|
|

|
1. As someone previously stated, get fixed ssceoledb.h(http://support.microsoft.com/kb/825393)
2. Set priority of include directory above pocket pc 2003 sdk include dir
3. add ole32.lib oleaut32.lib
4. move declarations of those broken
IDBInitialize *pIDBInitialize = NULL;
...
from SqlSvrCe.h to SqlSvrCe.cpp and
and define those variables in SqlSvrCe.h
extern IDBInitialize *pIDBInitialize;
5. remove oledb.h include and OLEDBVER, DBINITCONSTANTS, INITGUID defines
now it should compile without /FORCE
|
|
|
|

|
I'm having trouble pulling the data out of the database.
I have created a SQL query to return 3 integers, my goal is to store thoes
integers in an array.
Here is what I have done at the first occurance of "pIRowset->GetData" in ProcessRowset:
struct threeInts
{
INT32 *k1;
INT32 *k2;
INT32 *k3;
}
threeInts myOwnDataStructre;
pIRowset->GetData(hRows[lCount], hAccessor, &myOwnDataStructre);
if(myOwnDataStructre.k1)
{
memset(szBuffer, TEXT('\0'), 1024);
wsprintf(szBuffer, L",%li,%li,%li,", *(myOwnDataStructre.k1),*(myOwnDataStructre.k2),*(myOwnDataStructre.k3));
MessageBox(NULL,szBuffer,L"Row 1 Data",MB_OK);
}
else
{
MessageBox(NULL,L"Null Pointer",L"Error",MB_OK);
}
However the way the Pocket PC 2003 emulator behaves is to do nothing. I mean it skips the entire code was surronded by:
if(false)
{
...
}
The else part does not execute either.
(Not fully understanding what I am doing with the pointers in the wsprintf line: ) I also tried changing the wsprintf line to:
wsprintf(szBuffer, L",%li,%li,%li,", (myOwnDataStructre.k1),(myOwnDataStructre.k2),(myOwnDataStructre.k3));
This had an effect, it created the missing MessageBox() but the data given to me seems to be garbage. I guess they are memory addresses but possible they could be the data stored in some strange format that I don't understand. (I am thinking something like little endian.)
I am expecting to see the numbers 10,000 13,280 and 0
But I get the numbers 3,145,777 3,145,776 and 48
Notice that 0+48 = the ascii character "0" which led me to believe that these numbers were corrupted somehow.
Any suggestions?
Thanks
funky finger at gmail dot com
funky finger should be a single word
|
|
|
|

|
I guess I'm grasping at straws, here is what I have determined from the unexpected numbers I am recieving:
All the numbers have the 5th and 6th bits turned on, bits for 16 + 32.
The higher 2 numbers also have the 5th + 6th bits turned on in the third byte:
3145777:
00110000
00000000
00110001
3145776:
00110000
00000000
00110000
48:
00000000
00000000
00110000
I suppose this only confirms my theroy that these numbers do not mean anything.
|
|
|
|

|
I am now messing with the DDBINDING
if anyone is reading this I would like help configuring it to accept 3 (sql ce) ints
|
|
|
|

|
Well thanks to all your fine help.. I was able to fix the problem.
Btw if anyone has trouble accessing the data, I would be more than willing to help see my real email address posted first in this thread.
I am now working on getting it to work with a password encrypted database. If you would like this code feel free to email me.
|
|
|
|

|
Why does it appear as fellows:
fatal error C1010: unexpected end of file while looking for precompiled header directive
when I compile my software after I add SqlSvrCe.h and SqlSvrCe.app into my project by Project->Add to project->File...
Double click the error in the debug window, the cursor jump to the end of the file of the SqlSvrCe.cpp.
|
|
|
|

|
Getting the same error,
It was working,, I mean I got Demo #2 working after some headache. After that I included it to a different project and I get this same error message.
I tried making a new c++ file with .h pasted into the cpp file. Then I complied that, no problem there. It must be conflicting with stdafx.h or some other file. Bot sure exactly.
|
|
|
|

|
Hi all,
Microsoft has just released a patch for SSCE 2.0 SDK here:
http://support.microsoft.com/kb/825393
Because of incomplete ssceoledb.h in SSCE 2.0 SDK, you should have included oledb.h and link to oledb.lib on CE.NET platforms, therefore got us errors on linking, and had to use /FORCE linker option to avoid multiple defined symbols.
Read the link above if you had such problems.
Otherwise thanks for K-PAX for his work.
Killgec
|
|
|
|

|
Why do I Receive these error messages and how can I resolve them?
Thanks in advance!
SqlSvrCe.obj : error LNK2005: "struct ICommandText * pICmdText" (?pICmdText@@3PAUICommandText@@A) already defined in MySqlCe.obj
MySqlCe.obj : error LNK2019: unresolved external symbol CoUninitialize referenced in function WinMain
SqlSvrCe.obj : error LNK2001: unresolved external symbol IID_IDBInitialize
Please Help!
|
|
|
|

|
Im using evc++ 4.0 SQL CE 2.0, while i build the project,the following error msgs are given:
SqlSvrCe.obj : error LNK2005: "struct ICommandText * pICmdText" (?pICmdText@@3PAUICommandText@@A) already defined in sample.obj
SqlSvrCe.obj : error LNK2005: "struct IDBCreateCommand * pIDBCrtCmd" (?pIDBCrtCmd@@3PAUIDBCreateCommand@@A) already defined in sample.obj
SqlSvrCe.obj : error LNK2005: "struct IDBProperties * pIDBProperties" (?pIDBProperties@@3PAUIDBProperties@@A) already defined in sample.obj
SqlSvrCe.obj : error LNK2005: "struct IDBCreateSession * pIDBCreateSession" (?pIDBCreateSession@@3PAUIDBCreateSession@@A) already defined in sample.obj
SqlSvrCe.obj : error LNK2005: "struct IUnknown * pIUnknownSession" (?pIUnknownSession@@3PAUIUnknown@@A) already defined in sample.obj
SqlSvrCe.obj : error LNK2005: "struct IDBInitialize * pIDBInitialize" (?pIDBInitialize@@3PAUIDBInitialize@@A) already defined in sample.obj
emulatorDbg/test.exe : fatal error LNK1169: one or more multiply defined symbols found
I use MS hotfix for SQL CE, I still got this. pls ads
Jesse
|
|
|
|

|
hello,
i am using evc 4.0 and i added to another project the source files. when i compile the project i get several linking errors:
uafxwced.lib(filecore.obj) : error LNK2005: IID_IClassFactory already defined in SqlSvrCe.obj
uafxwced.lib(filecore.obj) : warning LNK4006: IID_IClassFactory already defined in SqlSvrCe.obj; second definition ignored
Creating library ARMV4Dbg/Mando.lib and object ARMV4Dbg/Mando.exp
SqlSvrCe.obj : error LNK2019: unresolved external symbol CoCreateInstance referenced in function "long __cdecl CreateSqlSvrCeProvider(void)" (?CreateSqlSvrCeProvider@@YAJXZ)
SqlSvrCe.obj : error LNK2001: unresolved external symbol IID_IDBInitialize
SqlSvrCe.obj : error LNK2001: unresolved external symbol IID_ICommandText
SqlSvrCe.obj : error LNK2001: unresolved external symbol IID_IDBCreateCommand
SqlSvrCe.obj : error LNK2001: unresolved external symbol IID_IDBCreateSession
SqlSvrCe.obj : error LNK2019: unresolved external symbol VariantClear referenced in function "long __cdecl ConnectDB(unsigned short *)" (?ConnectDB@@YAJPAG@Z)
SqlSvrCe.obj : error LNK2019: unresolved external symbol SysFreeString referenced in function "long __cdecl ConnectDB(unsigned short *)" (?ConnectDB@@YAJPAG@Z)
SqlSvrCe.obj : error LNK2001: unresolved external symbol IID_IDBProperties
SqlSvrCe.obj : error LNK2019: unresolved external symbol SysAllocString referenced in function "long __cdecl ConnectDB(unsigned short *)" (?ConnectDB@@YAJPAG@Z)
SqlSvrCe.obj : error LNK2019: unresolved external symbol VariantInit referenced in function "long __cdecl ConnectDB(unsigned short *)" (?ConnectDB@@YAJPAG@Z)
SqlSvrCe.obj : error LNK2001: unresolved external symbol IID_IDBDataSourceAdmin
SqlSvrCe.obj : error LNK2001: unresolved external symbol IID_IRowset
SqlSvrCe.obj : error LNK2001: unresolved external symbol IID_IErrorRecords
SqlSvrCe.obj : error LNK2019: unresolved external symbol GetErrorInfo referenced in function "long __cdecl GetErrorMessage(unsigned short *,int)" (?GetErrorMessage@@YAJPAGH@Z)
ARMV4Dbg/Mando.exe : fatal error LNK1120: 14 unresolved externals
Error executing link.exe.
please help!
thanks in advance,
Mario
|
|
|
|

|
The compiler (eMbedded V3.0).
demo 1:
missing include files:ssceoledb.h & coguid.h
demo 2:
missing a resource file?
What am i doing wrong here ?
|
|
|
|

|
Have you installed the MsSQL Ce 2.0?
Both sample.rc and resource.h was in the demo#2 folder rite?
HAZKZAI~ YOUR BUSINESS NEED, OUR CUSTOM MADE
|
|
|
|

|
I want to connect eVC4.0 to SQLCe but first I can't install SQLCE. When finish installing SQLCE, there is an error tells that SQL CE tools compatible only with SQL 2000 server SP1 or higher. But I'm running SQL2000 Server SP3 and ISS. Anyone tell me why? And please show me the way install SQLCE? Thanks a lot.
Cuong
|
|
|
|

|
the install procedure is,
SQL SERVER 2000 -> SQL SERVER 2000 SP3 -> SQL SERVER CE -> SQL SERVER CE SP3
then install adoce 3.1 on your PDA.
you will find 'dllregister.exe' in
'C:\Program Files\Microsoft SQL Server CE 2.0\Device\Arm\Sa1100'.
make 'sqlce200'( or if any ) directory to PDA and copy all of items in 'Sa1100''
then run 'dllregister.exe'
Good Luck
Be a better day than yesterday.
|
|
|
|

|
hi friend !!,
just download sqlce20sql2ksp1 and sql server 2000 sp1.
run the sql server 2000 sp1
then yours sqlce20sql2ksp1
bye
mayank
|
|
|
|

|
You can uninstal SQL server 2000, after install SQL Server CE v1.0/v2.0, and then install SQL server 2000 ^^
AN Phung
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
Add, edit, and delete records/table/database in MS SQL Server CE v1.0/v2.0.
| Type | Article |
| Licence | CPOL |
| First Posted | 15 Dec 2002 |
| Views | 274,130 |
| Downloads | 455 |
| Bookmarked | 43 times |
|
|