|
Hi,
I need to write an application that converts a Borland Interbase Database to an Access/SQL Server database.
My question is - after I have the source and destination database paths, what steps does my application have to take in order to actually convert the data?
I am using Visual C++ 2003.
|
|
|
|
|
open, read the source with source database syntax then open, write to the destination with its own format.
i guess you wanna copy from one to another right? where do you "convert" something here?
VuNic
|
|
|
|
|
By convert I meant that I have to take the data from the tables of the Interbase DB, and insert them into the correct fields and tables of the Access/SQL DB.
Yeah, I guess you could say that it's a copy and not a convert..
so like you said:
VuNic wrote: open, read the source with source database syntax then open, write to the destination with its own format.
but how I do all of this?
about connecting to the source db - I understand that I have to connect to the Interbase db through ODBC (after I have a driver for it), but how do I do this?
and what do I do after I have the connection? How do I transfer (copy) the data?
I'm really new to this subject, so all help would be appreciated...
Thanks
|
|
|
|
|
when you say , "select * from myTable" its gonna return all the recordsets in your table. so you have them in a recordset set object, i.e:
_recordset rec;
rec->GetRecordCount()
Now open the Target database....
In a loop, till the recordcount()is reached
{
1.read the record, (xyz database)
2.insert in the target table (acess)
3.MoveNext (xyzdataBase)
}
close(xyz)
close(access)
the data is moved
VuNic
|
|
|
|
|
I wrote the following code:
CDatabase srcDb;
if (srcDb.Open(NULL))
{
m_sDbName = srcDb.GetConnect(); //m_sDbName is a variable of type CString
UpdateData(FALSE);
}
CRecordset rs(&srcDb);
CString strSQL;
strSQL = "SELECT * FROM table1";
rs.Open(CRecordset::snapshot, strSQL, CRecordset::readOnly);
rs.Close();
Everything works OK, (the database is connected), but when it gets to the row:
rs.Open(CRecordset::snapshot, strSQL, CRecordset::readOnly);
the application crashes, and I don't understand why...
Is this the right syntax for connecting to a database and retrieving data from a table? Could you maybe attach some source code, so I could compare?
Another question - after the row: rs.Open(CRecordset::snapshot, strSQL, CRecordset::readOnly); executes I should have the data from the table in the recordset object, right?
|
|
|
|
|
How do I layout components , to add new GUI componets , delete , re-position dynamically at runtime in MFC
|
|
|
|
|
First you create GUI components (usually derived from CWnd class) such as CButton by calling their Create() method. Then you can change their position using the SetWindowPos() method.
|
|
|
|
|
Hi,
i searched for function to change a string is in lower case in to upper case.
thanking you
|
|
|
|
|
If you are using CString then use MakeUpper and if you are using char* string then use toupper function.
thanx
danishjibbran
|
|
|
|
|
sheshidar wrote: i searched for function to change a string is in lower case in to upper case.
what was the result?
VuNic
|
|
|
|
|
CString="tEst";
test.MakeUpper(); // now its TEST
test.MakeLower(); // now its test
cheers
zoz
|
|
|
|
|
Hi all
can any one tell me how to retreive the parent of a child in a TreeStructure which is derived from CTreeCtrl in MFC
|
|
|
|
|
Use GetParentItem. It takes HTREEITEM type variable as only argument whoes parent is to be retrieved and return the parent as HTREEITEM if parent exists otherwise returns NULL.
danishjibbran
|
|
|
|
|
Good evening,
I am building an application for distribution that will need to access information stored in tables (i.e. records, fields, etc...), and even perform calculations and table joins. All the data and functionality needs to be contained within the application since the application will be used by customers of my friends' businesses. In other words, any data managing and storing capability needs to be fully contained within the application.
My question is, what type of strategy should I use (ADO, DAO, ODBC, OLE DB, etc...)? Or do I have to implement a database type file system (i.e. using vectors, multimaps, deques, etc...) myself?
Thanks for your help.
|
|
|
|
|
BlitzPackage wrote: any data managing and storing capability needs to be fully contained within the application.
Have a look at http://www.sqlite.org[^] for a decent embedded DB. I have only used it for small data sets but it came highly recommended.
http://www.codeproject.com/info/search.asp?target=sqlite&st=kw&qm=all[^]
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Thanks, I appreciate the information.
|
|
|
|
|
Hi all.
I want to make my own control. with out using MFC and window standard library.
i have made MyBtn class with all necessarary function. but i want to know how to get message when user click on it. i use BtnProc (...) but it does not work.
will some one help me. how to make event with callback on my own Control class.
thanks for help.
Amrit
|
|
|
|
|
did you register the class for the btn window ?
-Prakash
|
|
|
|
|
OOps Nope,
can i get any sample source for it.
what are the steps for doing all.
thanks for reply.
Amrit
|
|
|
|
|
Well in your win32 application there must be a call to to registerclass to register your main window.
That is how you register a class,
but if you are writting your own button, i would prefer to subclass the windowclass that windows has defined, that way you can also use the Dialog editor to design your UI.
Just my thoughts,
I have not done like this before but i think that should work.
check here[^] for system classes
-Prakash
|
|
|
|
|
Thank you once again for reply.
to register do we need windows class or we can use our own class (with does not have any member of windows)
thanks
Amrit
|
|
|
|
|
you need to provide a new class name when you register.
-Prakash
|
|
|
|
|
Thank You Prakash
I will Try.
by the way i was wandering for example.
Thanks
Amrit
|
|
|
|
|
Sorry i dont any at the moment for win32 implementation of a custom control. But should not be too difficult if tried.
|
|
|
|
|
I am interested in extracting the edges from the gray scale images.
Presently i m trying to work with sobel. But if any one can suggest the appropriate filters which i can use for my edge detection algorithm. Is the hough transformation helpful? Please also suggest me some libraries if already exist.
Senthil
India
|
|
|
|