|
Hi & Thank you!!!
But how do I do if I have Many tables that I want to join. For example.
I want to see all companies including companys without email and also including companys without telephonenumber etc. Will I need some sort of nested join-query to do this? if so What how shall I write this?
Thanks in advance, Martin
|
|
|
|
|
Is the same
Select Company.*, email.email, phone.phone
FROM
Company LEFT JOIN email ON
Company.ID = email.companyID AND
Company LEFT JOIN phone ON
Company.ID = phone.companyID
If the phone or the email for that company don't exist, you will see the field like NULL.
Cheers!!!!
Carlos Antollini.
|
|
|
|
|
Working in MS ACCESS, developed a small database to track some dept. specific data for projects (nothing big). While working, I have somehow managed to make the Field List Editor disappear.
Clicking the toolbar button and/or the menu item that normally "re-displays" the field list editor, does NOT make the editor visible. I found something in the ACCESS help system that indicated something about piviot tables causing this problem, but I'm not using piviot tables in my project; anywhere.
Does anyone know how to get the field list back?
TIA.
D.
|
|
|
|
|
For the last month i have studing OLE DB with ATL and the ATL wizard in Visual studio c++.
I have Read severals articles about connecting to a database with CCommand and Caccessor and making SQL questions under DEFINE_COMMAND......
All this articles reflects a DB with only one Table. When you then wont to connect to several tables making SQL question, how do i do that?
Is it not possible or what? It must be, or else i think the ATL class for OLE DB is useless.
/Bigge
|
|
|
|
|
Just like with anything the wizards are a good start, but you must be able to add to what has been provided. The ATL OLE DB wizard only works with one table soyou will have to hand code the Accessor to provide for the additional tables.
|
|
|
|
|
I'm learning how to use the ATL templates to access a database. I can read from the table with no problems at all. Unfortunately I can't insert.
I read somewhere that an insert into an empty table can be trouble. Any suggestions.
|
|
|
|
|
What is the problem with the insert? Do you get errors or just empty records? Do you have the update property set?
|
|
|
|
|
I checked further today. The open statement fails when I have the insert, update or delete property set, but works when opened for reading.
I am using the Oracle OleDB driver from Microsoft. I'm wondering if it is a Read-Only driver????
Brad
|
|
|
|
|
Hello,
Is there any way to "select distinct" after deriving a CRecordSet class? I have a rather large table that has a small number of distinct values I'm looking for. Using "select distinct" works well when I query the database using a database viewer, but I'm not sure how I would do this in the derived CRecordSet class. Is there a way?
Thanks in advance!
Derek
|
|
|
|
|
Using CRecordset::Open();
in the second parameter you can write your sql string.
Open(CRecordset::dynaset, "Select Distinct * from table where...");
Cheers!!!
Carlos Antollini.
|
|
|
|
|
What if I already have a derived CRecordSet class like:
class CEmployeesRecordSet : public CRecordSet
{
...
}
Is there anyway to do it from this class?
|
|
|
|
|
If you can't answer that question yourself you need switch to VB or other languages where you won't hurt yourself.
|
|
|
|
|
Yes, You don't have problem with that.
You only need to use the open method in your class. Your class is derived from the CRecordset class, is for this that you don't have problem.
Cheers!!!
Carlos Antollini.
|
|
|
|
|
I want the AAID to be the BBID but this aint working!
DECLARE @sune int
SELECT @sune = MAX(AAID) FROM TEST_SESSION
INSERT INTO CAB_TEST
(BBID, CabComment, CabName, CabFNum, CabFName, CabSNum, CabEmp, CabRefDes)
VALUES(@sune, Null, 'Kabel1', '222-221', 'Styrkabel', Null, 'Chassi', Null);
Plezz Help
/Bigge
|
|
|
|
|
For the Last 6 hours i have tried to connect to a MSDE database wich was produce on a another computer using Win 2000, When i use the ATL wizard consumer function I get the messeage "Could not open column information"
I have troubel to connect to other sources to, it had work before but something is really wrong now, and Im very frustrated.
I can look at the database in Access 2000 but when i will create a new table i get the mes. "You got no exclusive access to the database at this time".
My questinon to you people are, How should the producer of the DB configure his database(using Access 2000 adp project) so it easy can move it to another machine and system?
Im very grateful for answers.
/Bigge
|
|
|
|
|
Do you have admin priviledges? What are the security settings on the DB? Is it corrupted? Have you run a compact/repair successfully? Do you both have the latest MDAC on your systems?
|
|
|
|
|
When i lanche his DB i change the login ID and Sql server ID under connection in Access. And link the *.mdf file to the catalog om my computer. Thats it
We have admin priviledges, the security settings im not shore of. compact/repair were is this option?
I have only installed MSDE and i tried to use servicepack 3 for SQL server 7 to uppgrade MDAC and more. But i got some failurs. Do you now witch pack i should uses to uppgrade?
Thanks alot
/Bigge
|
|
|
|
|
After 8 hours it worked, the MSDE server was corrupt. SH*T HAPPENS!
|
|
|
|
|
Hi there,
I was wondering if there is any open source Database project where one
could participate in. I am refering to an actual Database Development
Project as opposed to SQL.
If not, is there any site where you can get some headstart into the
design of relational databases?
|
|
|
|
|
There are lots of open source projects on freshmeat.net and sourceforge.net.
|
|
|
|
|
IMHO, PostgreSQL is the best thing out there.
It basically kicks arse on all the other free RDBMSes and the vast majority of commercial offerings.
I have recently started using MS SQL server at work and I must say, Postgres compares very favourably.
http://www.postgresql.org
You'd have to be pretty hard core to wanna get into this source code
|
|
|
|
|
|
Objectives
The objectives of this project are: to design a conceptual database schema (Entity-
Relationship diagram or any other conceptual modeling notation) for a given
specification of a sample database domain, to translate a conceptual schema into
object classes and associations of object-oriented database, to specify the object
classes and associations in Object Definition Language, to implement and to load a
sample contents of object-oriented database and to implement few database
applications using Object SQL and C++ bindings.
|
|
|
|
|
I don't see a question here so I'm assuming you are just keeping everyone updated on your current homework project.
|
|
|
|
|
I have a database set up where some columns might have no data entered like in the following example
<br />
record [Column1Data : Column2Data]<br />
record [Column1Data : Column2Data : Column3Data]<br />
I would like to differenciate between the two records by querying the first record that has no data for column3.
I figured on trying
SELECT * FROM TABLE1 WHERE Column1 LIKE 'Column1Data' AND Column2 LIKE 'Column2Data' AND Column3 LIKE ('')
but this returned no records. Is something like this possible or might this be an issue of database setup?
Thanks!
|
|
|
|