|
My program about ADO run correctly on my machine,but it can't correctly run on the machine whithout VisualC++ IDE. I find it runs the following statment:
_CommandPtr cmd;
_ConnectionPtr conn;
.......................................
cmd->ActiveConnection = conn;/Error occurs
I don't why.Can somebody help me!
Thanks very much!!
VCBeginer
|
|
|
|
|
Forlegend wrote:
it can't correctly run on the machine whithout VisualC++ IDE.
Maybe the problem is because you don't have MDAC on that machine.Are you sure about it?
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
Oh! I get it. Thank you again!!
VCBeginer
|
|
|
|
|
I can't run the code from the articles from CPj site. I haven't msado15.dll.
I have downloaded and installed MDAC 2.7.
I'm running WindowsXP. VC6 + SP5. MSDE + MSSQLServer 7
|
|
|
|
|
I'm sure it's somewhere on your system! Use the windows find utility to have a look for it. When you find it, copy it to c:\winnt\system32 and then from the dos prompt
cd to c:\<insert your="" win="" dir="" here="">\system32
regsvr32 msado15.dll
To unregister it, go back to the system32 directory, and type
regsvr32 -u msado15.dll
I'm running Win2k Pro, so I've never used XP, so I'm not sure what it calls the windows directory, but I'm sure you can figure it out! Good luck!
skydiving....if at first you don't succeed, you're fecked!
|
|
|
|
|
I found my copy of msado15.dll in c:\Program Files\Common Files\System\ado\
You should have it, but if you don't, drop me a mail...
skydiving....if at first you don't succeed, you're fecked!
|
|
|
|
|
Oh, thanks a lot, you have saved me... I used "Find" but nothing showed up (...)
I found it in c:\Program Files\Common Files\System\ado\ as you wrote.
Thanks again
|
|
|
|
|
Hi,
I’m working on a project for university and need some advice. Here is an idea of what it is about. “You are hired by a company with the following problem. They need an administration system for their independent employees and for their members. This company sells various kinds of batteries through a complicated sales hierarchy. The company has a few bosses. Each boss has a team of managers that works under him. Each manager has a team salesman than work under him. The salesman sells batteries to clients. Design a visual basic 6 application (using an access db) and design a basic administration system for this company. The administration system must keep track of the following data, all bosses and their managers, all managers and their consultants, all consultants and their client. You also need to store address and contact details for employees as well as information about the training they attend while working for the company.”
I have a few ideas on how to design the hierarchy but don’t know if it’s right.
What would the best way be to design the tables?
Thanks
|
|
|
|
|
Is Easy, you need to create a table of bosses, anhoter table for manager, another for salesman and other for clients.
Then you need to crete a table that inform the realation between bosses and Managers, other with the realtion with manager and salesman, and in the last one the relation between salesman and clients. With the correct FK you can control all the information.
For example.
One Bosss have several managers. Each manager have several salesman. and finally each salesman have several clients. With a simple and good query you can display all the information, and explot it. For example the Info of each client or each Salesman, etc.
Best Regards....
SSSHHH!!! take care because Toammasz Sowinski desagree with the homeworks....
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Is Easy, you need to create a table of bosses, anhoter table for manager, another for salesman and other for clients.
Then you need to crete a table that inform the realation between bosses and Managers, other with the realtion with manager and salesman, and in the last one the relation between salesman and clients. With the correct FK you can control all the information.
For example.
One Bosss have several managers. Each manager have several salesman. and finally each salesman have several clients. With a simple and good query you can display all the information, and explot it. For example the Info of each client or each Salesman, etc.
Best Regards....
SSSHHH!!! take care because Tommasz Sowinski desagree with the homeworks....
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Carlos,
That was one of the options that I was considering. The problem that I have with that is the three tables. I think bosses, managers and salesman are all the same thing (employees). I was thinking of doing it like this:
Create a table called EMPLOYEE and another table called CLIENT. Every employee in the EMPLOYEE table will have a level. (This will indicate whether he is a boss, manager or a salesman) Now create to association tables called MANAGERBOSSACCOS and SALESMANMANAGERACCOS. These two tables can now be used to indicate the hierarchy. Like this:
EMPLOYEE
EMP_ID EMP_NAME
1 Boss1
2 Boss2
3 Manager1
4 Manager2
5 Manager3
6 Salesman1
7 Salesman2
8 Salesman3
MANAGERBOSSACCOS
BOSS_ID MANAGER_ID
1 3
1 4
2 5
SALESMANMANAGERACCOS
MANAGER_ID SALESMAN_ID
3 6
4 7
5 8
What do you think of this design?
|
|
|
|
|
Yes is true...
Is better to think the employee like a person, and a field that inform the category of the employee (Boos, Salesman, manager, etc) and other table for the clients.... You only need to add ONE table for the relation between employees and other for the relation between employees and clients, and ready... Three tables and ready....
For example.
EmployeeRelations (Employee ID -> Employee ID)
1 -> 20
1 -> 21
1 -> 22
20-> 30
20-> 31
The employee 1 is type Boss, the Employee 20, 21 and 22 are Type Manager and the Employee 30 and 31 are type Salesman...
EmployeeClientsRealtions (Employee ID -> Client ID)
30 -> 1
30 -> 2
30 -> 5
31 -> 9
....
Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
|
Hi,
I'm doing a web project which requires a way to send a huge number of emails to subscribers (like a mailinglist). and this point is very important : mails must be sure to be sent.
I now write a C++ app. on Windows 2000 server, use CDONTS component to send mail. this is very convenient, but i faced a problem : CDONTS relies on SMTP service of IIS, and in pretty poor internet connection, IIS's SMTP service seems stucked for pretty long and seems not reliable.
Do you have any better solutions ? many thanks
trieuhainguyen@pyramid-consulting.com
|
|
|
|
|
Sorry, I don't want any extra spam today.
// Rock
|
|
|
|
|
sorry? it's not about spam mail, it's a business project (like news mailing list)
trieuhainguyen@pyramid-consulting.com
|
|
|
|
|
Do we have SQL Statement with 'AND' , 'OR',For example:
SELECT * FROM Table1 WHERE Column1='sth' AND Column2='sth' OR Column3='anotherthing'
Thanks
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
I found it friends.Thanks
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
|
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
I have a database and a table in it,with primary key,the index of primary does not accept "duplicated value",So when I want add records to database for second time it gives me error that :
The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index,or redefine the index to permit duplicate entries and try again.
What is duplicated value?
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
A primary key index cannot have two records that have matching values for the key field. They have to be unique for the table. If you are trying to Update a record with a primary index included, try deleting the record first, then adding the new one.
|
|
|
|
|
hmmmm,What about the time I want to INSERT record?For the first time it is ok but second time it gives me that error,How can I avoid that one?
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
Is this happenning on non-duplicate values, or are you trying to add multiple records with the same value in the primary index field? It isn't clear what's going on...
|
|
|
|
|
I have DataSet and DataGrid,in my application I add or delete some records from DataGrind,after all I check the dataset if anything change compare to the original datasource,if something change or add or delete,it add these change to the datasource.The code made these changes is here:
deletedRows =myDataSet.GetChanges(System.Data.DataRowState.Deleted);
if (((deletedRows) != (null)))
{
myOleDbAdapter.Update(deletedRows,"Companies");
}
updatedRows = myDataSet.GetChanges(System.Data.DataRowState.Modified);
if (((updatedRows) != (null)))
{
myOleDbAdapter.Update(updatedRows,"Companies");
}
insertedRows =myDataSet.GetChanges(System.Data.DataRowState.Added);
if (((insertedRows) != (null)))
{
myOleDbAdapter.Update(insertedRows,"Companies");
}
Roger Wright wrote:
Is this happenning on non-duplicate values, or are you trying to add multiple records with the same value in the primary index field?
I don't know when I add non-duplicate or duplicate,I mean I don't what are they to know when I add which of them.The error tell me that I create multiple value in the index,primary key or relationship.This happend the SECOND time I call that function not for the first time.
Thanks
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|