|
I'm working a database program using ado.In it ,i use Ado data control with DataGrid control.when i release the program,i have to change the a parameter in ado data control(connection string).for example,The path of old .mdb must to be changed to new path.However ,The ado data control has not change at all!After i used ado.setconnectstring().the program work well.But when the program is released to another pc,the error message appear"cannot initialize data bindings". as if It's from DataGrid. but i don't know how to reset Datagrid or ado parameter.who can help me,please?
|
|
|
|
|
With arrival of yet another Jet 4.0 Service pack (SP6), In 4!!! different exes depending on OS version, is it possible to have installshield to install the latest Jet version along with MDAC in my applications MSI file?
(Solutions using Visual Studio Installer would also be helpful... I don't like Installshield much)
Thanks...
Blade[DMS]
|
|
|
|
|
check in the site of the product...
May be Install Shield, developed a new object for that.....
regards
Carlos Antollini.
www.wanakostudios.com
Sonork ID 100.10529 cantollini
|
|
|
|
|
Yes I've found that...
Thanks...
Blade[DMS]
|
|
|
|
|
Dear Codeproject Users,
I want to make a Win application that uses a database, currently I am using ADO and Visual Studio .NET.
I want the user to be able to create an account on a database hosted remotely on a server in the internet, or if the users already has an account he can login. (This is what happens with programs like Napster).
After when a user logins he can edit his profile in the database (he can update only one record in the database, the record associated with his username).
How I accomplish this, there is a good tutorial out there?
Thx
"Nelle cose del mondo non e' il sapere ma il volere che puo'."
|
|
|
|
|
I want to define a custom datatype in SQL. I need it to be a structure that contains multiple fields. There is n't a struct datatype in SQL. How should I do this? Thanks.
Steve
Not all who wander are lost...
|
|
|
|
|
What database are you working with?
SQL Server, Access, DB2 do not support what you are asking for exactly. SQL Server supports custom data types, but they are just simple types with pre-defined defaults and rules.
Typically when working with a DB, you just flatten your strucutre into columns and deal with it like that.
Object oriented databases and XML based databases do support the concept of a struct (or entity), but this only applies if you are working with one of these forms of DB.
|
|
|
|
|
I am working with MS SQL Server 2000.
I am developing a large app that has app based security. I was looking for a way to embed this info in the database. If worst comes to worst I will just have the same fields at the top of each table.
Steve
Not all who wander are lost...
|
|
|
|
|
I don't know how your tables are layed out, but you might be able to have a single table for this info and have a 1:1 relationship between this table and the others. If you're tables aren't layed out easily, you could have an identity column in your strucutures table and add a column to each of your tables pointing to the identity column on the strucutues table.
Another idea (just a thought, I've never done this) would be to use a blob or if possible a char field for the entire structure. If it can be easily represented as text you could just string it together (comma delimited, etc) and stuff it in a single column.
|
|
|
|
|
One other thing...
I would recommend against adding the same columns to a bunch of tables. I've done this exact thing in the past and it can be a nightmare to manage later. What happens when you need a new field in this structure? How many tables do you have to modify?
Out of curisoty, what fields are in your structure?
|
|
|
|
|
What About use, text fields, with any detereminated struct?
Regards
Carlos Antollini.
www.wanakostudios.com
Sonork ID 100.10529 cantollini
|
|
|
|
|
Howdy,
Does anybody know whether the SQL max connections metric is process or thread based?
ie If I have an SQL server with up to 3 connections and am running an app which sporns threads which connect to the database will the app have trouble upon more than 3 concurrent threads executing.
If the connections are process based then this architecture will do fine. If howver SQL connections are measured on a thread basis then I'm going to have to rewrite the app.
Thanks,
Damian Del Campo
|
|
|
|
|
I've just found out that the magical number of '5 connections' isn't a licensing issue as I thought it was but that it is a 'maximum recommended'.
Thus I don't have a problem anymore !!!!!
BTW, this recommendation is apparently due to performance degradation for more than 5 connections. Is this true? I thought the only difference between MSDE and MSSQL was the management tools that come with MSSQL as the install size, structure and location seems to be identical.
Thanks anyway to anybody who would have offered to help with my problem, which is no longer a problem.
Damian
|
|
|
|
|
ived use the sqlconnection class to coonect to sql server 2000 and use its sqlcommand to write query and datareader to retrive data the prob is that when ever i have to refer a databse table i have to make a new coonection useing coonection string...and than acce the table.
is there any class and method so dat just need 1 connection too the datbase and refer too any table...
do guide me
thanx
|
|
|
|
|
Must wrote:
ived use the sqlconnection class to coonect to sql server 2000 and use its sqlcommand
Can you tell me what is your code? Then maybe I can help you.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
You can declare an object first, so you have to call an object to use it.
for example in C# :
private SqlConnection conn;
public Connections()
{
conn = new SqlConnection("server=(local);database=pubs;Trusted_Connection=yes");
}
when you need a connection, you just open a connection with : conn.Open();
Hope help..
|
|
|
|
|
If the connection string is (exactly) the same, then you'll benefit from connection pooling.
Other than that, I'm not sure what you're after.
Cheers,
Simon
"Every good work of software starts by scratching a developer's personal itch.", Eric S. Raymond
|
|
|
|
|
Hi,
In a nutshell: If i kill an MFC+DAO based server application while it is updating records using ctrl-c, the application exits and the database shows 0 records even though, 2 seconds ago, DaoRecordset::RecordCount() was returning 1000.
It listens for messages on a socket and updates a RecordSet in table "CallLog".
During update, I can see that RecordSet_for_CallLog.GetRecordCount() returns 10, 11 & 12 etc. records as messages are received over the socket, parsed and updated in the dbase.
The problem occurs when I close the application midway while it is updating the Recordset. I can see that previous calls to GetRecordCount() were returning 10, 11, 12 etc. but when I open the database file in MS Access, there are no records in the table CallLog.
If I open the file in Notepad, I can see the Record data in a jumbled form somewhere. So I guess, for some reason, MS Access garbles up the file while exiting, can someone tell me why? I need to handle this to avoid accidental failure.
The main class is not derived from CWinApp. I call the constructor and methods directly in _tmain(). I made the application using the "Win32 Console Application" option in the New project Wizard and later checked the option for MFC support.
I have mainly worked in the Win32 API and on Linux, using a comiler from the commandline, so this MFC+DAO mumbo jumbo is pretty confusing. Even Charles Petzold says so
|
|
|
|
|
I guess that the database transaction gets rolled back when the application is aborted.
|
|
|
|
|
thanx for the reply, but if ut got rolled back, i would not see any data, if i open the file in notepad or ultra-edit, i can see my data, login_names and IP's etc. so i guess the prob is not there. thanx anyway!
|
|
|
|
|
I don't believe your assumption is correct. Access doesn't necessarily overwrite deleted data in the file, it may just be marked as available space. Then the table will be empty when viewed in Access, but parts of the data may be contained in the .mdb file.
|
|
|
|
|
fine, that's ok but before i close it with the cross on the console or thru ctrl-c i see CDaoRecordSet::GetRecordCount() returns 11, 12, 13.
When i open the mdb file in access, the table shows zero records. i am not using daoworkspace, is that the problem?
|
|
|
|
|
Dear codeproject users,
I need to build a system for put in communication information providers and users.
I mean that I should have a database with some columns like, Name, address, phone#, email, stocklist.
Every provider of informations will have it's account, and will be able to update his information, like when they have a change in stock list, when they change the phone number (frequently since they move a lot), etc.
The users need to search in the database for the people that match their criteria, like, they live in the same address, the have stock list of "Java programming books". etc.
I hope you got the idea.
Now I tought I need 1 database, and 2 applications.
The provider application will let every provider log in it's account with a USERID and a PASSWORD, and afther that modify trough the APP his row in the database, update columns etc.
The user application will let every user search in the database with some criteria.
Ok.
Now I want to know.
How I make a database of this kind, where a provider can logon and modify ONLY one row in the database.
How I build the application, I am supposed to use Visual C++ (with .NET if necessary).
I think you understand that I ask this because I'm a beginner!
Thank you.
"Nelle cose del mondo non e' il sapere ma il volere che puo'."
|
|
|
|
|
please refer to CodeProject -> database -> Ado.
you may find articles for beginners .
you also need to know some transact sql programming.
don't giveup.
It's will take a while.
Aizik Yair
Software Engineer
|
|
|
|
|
I have a situation which I am trying to solve just by creating SQL's without programming because of some installation requirements. I did not have any luck with it. Was wondering whether anyone knows of a solution :
Here is the situation-
DB2 Table 1:
------------
FirstName LastName DateOfBirth History Date
--------- -------- ----------- ------- ----
Joe Smith 01/01/95 05/25/1997
Joe Smith 01/01/95 11/01/1997
Bob Smith 05/07/55 10/01/1998
Sherri Gaston 11/11/73 11/15/1999
Sherri Gaston 11/11/73 12/20/1999
Sherri Gaston 11/11/73 05/05/2000
Primary Key in the above table is FirstName, LastName, DateOfBirth.
From the above table I am trying to create a "daily" level table which will have a record for every primary key starting from the history record date to the next history record date.
So for example the result for "Joe Smith" will be
Joe Smith 01/01/95 05/25/1997
Joe Smith 05/26/1997
Joe Smith 05/26/1997
Joe Smith 05/26/1997
Joe Smith 05/26/1997
.........until 11/01/1997 (his last record's history begin date).
I don't mind building intermediate temporary tables. Can anyone help or thing of something?
Thank you
M
|
|
|
|