|
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
|
|
|
|
|
I've read your thread with Roger and I'll try taking a scond approach at explaining the problem.
In a database you have tables; each table has one or more Primary Keys defined on it. A primary key is made up of one or more fields.
A primary key is a unique value in the table, there can only be one such key in the table as well. If you only have one field, called username then each username in the table must be unique. Now you can also have two fields be the primary key; in that case that same combination of values can only exist in the table once. If you have a primary key made up of UserID and OrderID then you can have multiple records with the same UserID and you can have multiple records with the same OrderID, but you can have only one record with the same combination of UserID AND OrderID.
The error you are receiving is because you are trying to add (or update) a record that would create a duplicate primary key.
HTH,
James
Sonork ID: 100.11138 - Hasaki
"Smile your little smile, take some tea with me awhile.
And every day we'll turn another page.
Behind our glass we'll sit and look at our ever-open book,
One brown mouse sitting in a cage."
"One Brown Mouse" from Heavy Horses, Jethro Tull 1978
|
|
|
|
|
hmmmmm,now I got the point .
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
|
|
|
|
|
Seems that using a parameterized query as a SelectCommand for an OleDbDDataAdapter to fill a DataSet doesn't work!
The following code is how I'm doing that. All the code is inside an try/catch block. The language i'm using is C#
// Using a UDL file for the connection string
string strDBConn = "FileName=D:\Contacts.udl;";
// Sets up the connection
OleDbConnection conn = new OleDbConnection(strDBConn);
conn.Open(strDBConn);
// Creates a new command
OleDbCommand cmd = new OleDbCommand(
"select * from dbo.Contacts where contact_id = ?", conn);
// Sets up the Data Adapter
OleDbDataAdapter da = new OleDbDataAdapter();
da.SelectCommand = cmd;
// Sets the Command parameters
param = da.SelectCommand.Parameters.Add (
"@contact_id", OleDbType.Numeric, 9, "entid_id");
param.Value = 1; // The parameter value
// creates a new DataSet
DataSet dsResult = new DataSet()
// Fills the DataSet
da.Fill(dsResult);
Somehow in the last instruction it generates an exception that even 'catch (Exception e)' can't get exactly because in spite of falling in this catch block the 'e' (the exception) is null!
But the reason he is throwing some weird exception is because the parameters are not being declared first before querying the database with the parameterized select command and consequently the string that is being sent is only "select * from dbo.Contacts where contact_id = @P1" and nothing else.
I'm using a .UDL file to set my connection string which is set with valid parameters because it's being used everywhere else in the app and it works perfectly.
My Database is SQL Server 2000... Yeah, of course I could use SqlDataAdapter and all the other classes specific for SQL Server but the fact is that I want to use an .UDL file to set my datasource and the only way to do this is using the OleDb... classes. UDL files doesn't work with SqlConnection in case you didn't know.
So... am I doing something wrong here in setting the Data Adapter to a parameterized query? Is this a bug in the .NET framework? Can you help me out with this? Thanks in advance
Best Regards,
Paulo
|
|
|
|
|