I am trying to find at least some training in working with databases. I ask people and the maximum that I hear, so this is the name of some methods such as ADO, OBDC, etc. Where is any tutorial in Russian? Nobody knows. No one. How did you learn that without tutorials?
- Learn how to work with SQL queries. How do you do - life will be much easier, because the same [ADO] [1] [uses] [2]. And then to fasten any open-source [firebird] [3] will not be a problem at all. [1]: msdn.microsoft.com/en-us/library/ms810810.aspx [2]: support.microsoft.com/kb/281998 [3]: firebirdsql.org - gecube
- I know the basics of SQL. This does not help me to understand how to work with the database through C ++, and not through the DBMS. - chevchelios
- Roughly speaking, you open the database through the library, form a query and get it through the special function of this library itself. Further, by means of the language you understand what you got. See the same firebird usage examples. - gecube
- At the beginning it is a rather voluminous mathematical apparatus. Then comes the implementation. - 0andriy
3 answers
Well, you should at least clarify with which base you are going to work and how. There is such a thing Entity Framework allows you to work with the database, as with a set of classes (this is if you exaggerate greatly), but in order to connect to the database you need a .NET provider to a specific database. If there is no confidence in the frameworks, then here is an example in C # how to do it with your hands, in C ++ it should be similar, the method deals with writing data to the FireBird database:
public void MyExecuteNonQuery(string command, Dictionary<string, object> paramList) { FbConnection fb = new FbConnection(PMSys.Properties.Settings.Default.configurationString); fb.Open(); FbTransaction fbt = fb.BeginTransaction(); FbCommand cmd = new FbCommand(command, fb); cmd = ParamIterator<string, object>(cmd, paramList); cmd.Transaction = fbt; try { int res = cmd.ExecuteNonQuery(); fbt.Commit(); //если вставка прошла успешно - комитим транзакцию } catch (Exception ex) { throw new Exception(ex.ToString()); } finally { cmd.Dispose(); fb.Close(); } }
Something concrete, the same tutorials can be prompted when you decide which database you will work with. In general, work with the database happens everywhere according to the same scheme created connection → opened it → created transaction → created command -> sent command → if everything went well, Commit transactions → closed connection
- At first, I would like to work with MS Access or another simple database. Yes, even if there will be something more complicated, for example, MS SQL Server, MySQL, Oracle, etc., I just did not even find how to work with such databases. Bd is not important, although I would like to be simpler. I don't care how to work. Let it be a framework, but the main requirement: C ++. Not C ++ / CLI, not C #, not something else. I do not know what a .NET provider is. Let there be a .NET provider to the database, most importantly C ++ Looked at the Entity Framework on the wiki. I understood that Entity Framework is .NET, and in .NET there is no C ++. - chevchelios
- What does C ++ mean in .NET? under .NET you can write at least Delphi, but I generally keep quiet about C ++ .... - KoCaTKo
- ru.wikipedia.org/wiki/List_.NET- languages and Delphi is there. - chevchelios
- Yes, in general, what is the language? Language is an entity completely platform independent, which is what it is. If I make a compiler for an abstract language into the intermediate code il of a dotnet, will this language become a dotnet language ??? - gecube pm
- Why are you all just thinking and thinking? Why no one can just give a link to any training? Everyone knows, but nobody knows ... - chevchelios
Well, if you really want to do so in C ++, you may like QT))) Well, in Visual Studio it’s more convenient to work with databases using ADO.NET . And your application written in c ++ / CLI will work under the .NET platform
- I want to stay on VS, especially since I am learning DirectX. C ++ / CLI doesn't interest me too. - chevchelios
You will find the link on this topic on the network yourself, the same MSDN. Let me give you advice: it is very inconvenient, as for me, to write a database application in VC ++. It is much easier, faster to implement such a task in Borland Builder C ++.