|
Thanks for the response.
I'm currently experimenting with running the SQL schema script from Installshield. This seems to be easy enough to do. The bastard bit is working with Installshield to do the user-interface and script flow to ask the user for the server name, passwords etc.
I hate Installshield.
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
So do I.
In my case I wrote a generic installer engine that can do COM+ component installs, database creation, as well as version/date checked file copying, file compression et cetera, all driven by XML, with a simple WTL-based wizard UI. Robust enough for the kind of stuff my own company does, and easy to modify & test.
Steve S
|
|
|
|
|
Hi,
Three tables... Authors, Books and (Books/Authors), a book can have several authors, and author can have several books ( quite classic ).
My question is... I would like to get in a select a list of books and his authors ( in the same row), e.g.
One Book - Mark Hammon, John kirk
Antoher Book - Another Author, Another thing
I know with number there are quite powerful methods ( count, avg, ...), but with strings ? could it be possible to concat this strings ??
I think with SQL Server maybe it's possible but with Ms Access... , thanks in advance
Braulio
|
|
|
|
|
You can easily concatenate columns in the same row with the + operator (might be & in Access, because the expression engine is based on VBA). However, I don't know any way of aggregating rows into a string.
(Note to MS: it'd be really useful if there was a way to define your own aggregate functions...)
I think you'll have to do this client side.
|
|
|
|
|
Hi,
I found a solution with SQL Server, a bit ugly T-SQL thing...
<br />
CREATE TABLE foo<br />
(c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10) NOT NULL CHECK (c2 NOT LIKE<br />
'%,%'), PRIMARY KEY (c1,c2) )<br />
<br />
INSERT INTO foo VALUES ('Tom','Car')<br />
INSERT INTO foo VALUES ('Tom','House')<br />
INSERT INTO foo VALUES ('Tom','Plane')<br />
INSERT INTO foo VALUES ('Tom','Boat')<br />
INSERT INTO foo VALUES ('Jim','House')<br />
INSERT INTO foo VALUES ('Jim','Boat')<br />
<br />
CREATE TABLE Results<br />
(c1 VARCHAR(10) PRIMARY KEY, c2list VARCHAR(100) NOT NULL)<br />
<br />
INSERT INTO Results<br />
SELECT c1,MAX(c2) FROM foo GROUP BY c1<br />
<br />
WHILE @@ROWCOUNT>0<br />
UPDATE Results<br />
SET c2list =<br />
(SELECT MAX(c2)<br />
FROM foo<br />
WHERE foo.c1 = Results.c1 AND<br />
foo.c2<LEFT(c2list,CHARINDEX(',',c2list+',')-1))<br />
+ ', ' + c2list<br />
WHERE EXISTS<br />
(SELECT *<br />
FROM foo<br />
WHERE foo.c1 = Results.c1 AND<br />
foo.c2<LEFT(c2list,CHARINDEX(',',c2list+',')-1))<br />
<br />
SELECT * FROM Results<br />
<br />
|
|
|
|
|
Hello
i serach for an sql command which creates a 1:1 relation in an access
database. I think i can do this wiht CONSTRAINT but how?
In the access help i found this:
CREATE TABLE Bestell (BestellId INTEGER PRIMARY KEY, KundId INTEGER,
BestellNotiz NCHAR VARYING (255), CONSTRAINT FKBestellKundId FOREIGN KEY
(KundId) REFERENCES Kunden ON UPDATE CASCADE ON DELETE CASCADE
but this creates only 1:N relation!
|
|
|
|
|
Add a UNIQUE constraint to KundId ?
|
|
|
|
|
could someone plz explain me on what OLEDB and ODBC are??
what is the difference between oracle ,sql and access databses!
what are ADO and DAO?
ranjani
|
|
|
|
|
ODBC is a engine to access the database developping by ms.
using it,you can access all kinds of database software which can be work
on windows 9x&2k&xp. it construct a way from your platform software to the databse.
sql is structure query language for short.
your sql is a database management software developping by ms.
Ocracle give you powerful function. it can manage the largest data.
ADO is Com compenment and can place the odbc.
dupengfei
|
|
|
|
|
recently i work on oledb&sqlserver, for some reason , i use many unregular table name just like guid, for example: 4DACE4ED-55A9-4F9C-9270-CE73CBF067F3.
there is no problem on my computer at all, but yesterday i install the application on an other machine, it does not work anymore,so i debuged the program on that machine and found that creating table is ok, but error occurs while opening a table with such unregular name. can anyone please tell me what the reason?
should i need any aditional package?
many thanks
|
|
|
|
|
You might find that the problem occurs because the tablename begins with a digit not a letter. You can also try quoting the name, as in
SELECT a,b,c FROM [4DACE4ED-55A9-4F9C-9270-CE73CBF067F3]
and see if that helps...
Steve S
|
|
|
|
|
thank you Steve, it works , the reason is the tablename begins with a digit.
it's very kind of you
|
|
|
|
|
Hi,
Has anyone seen or been able to test out the new release of SQL Server?
I've heard a lot about this new version and read some articles this one regarding the new features, but haven't seen the interface or the integration of C# for writing stored procs.
Any information would be great!
Thanks
Tony
|
|
|
|
|
Anyone on that beta is subject to the NDA requirements that they not disclose any information about the product.
Cheers,
Tom Archer
Inside C#, Extending MFC Applications with the .NET Framework
It's better to listen to others than to speak, because I already know what I'm going to say anyway. - friend of Jörgen Sigvardsson
|
|
|
|
|
What is public knowledge is that .NET can be used to created Extended Stored Procedures, not T-SQL replacement stored procedures.
MS Research is working on an inline .NET language T-SQL replacement, but no MS BU has taken up the project, yet.
Cheers
Mike
Johannesburg, South Africa
|
|
|
|
|
Hi,
My problem is that I have to use data of an oracle-db without a connection!!
The steps I have to do are:
1) filling a dataset
while()
{
2) serializing this dataset
3) storing it into a file
4) deserializing the stored file
5) making changes of the data of the dataset
6) serializing this dataset
if(...==...)
break;
}
Is it possible at all to change data of a dataset without a db-connection?
Thanks
wolf
|
|
|
|
|
You can offcourse change the data in a dataset and serialize the changed data. If you later want to update the database with the changed serialized dataset, you should save the dataset with the diffgram option...
this.WriteXml(@"c:\northwind_subset.xml", XmlWriteMode.DiffGram);
this.ReadXml(@"c:\northwind_subset.xml", XmlReadMode.DiffGram);
|
|
|
|
|
The Batch update method should be faster then using the execute method in udating database. However I did a simple test to insert for example 100 records to a table, noticed that time take for execute method actually is faster then batch update. Is this correct ? any idea ?
Thanks for help
|
|
|
|
|
Hi
My Program use the CADOX Classes from Carlos Antollini
to connect itself to a access database via ADO.
Is there any way to start the Access file import wizard
over ADO to import new tables from csv files to my database?
Please help!
|
|
|
|
|
No, although you might be able to use Access automation to do it; ADO and ADOX don't include such functionality.
Steve S
|
|
|
|
|
design db schema 4 payroll sys
1) employee info with basic salary,allowances,deductions.
2) monthly payslip of employee
3) income-tax calculations at financial year end
i want ER diagram 4 this.
i m student .i have prepared my ER diag.
but i want 2 verify with those of the gurus!!
help urgently!!
(if example template of payroll sys. available pleas direct me 2 the resource.)
|
|
|
|
|
Can anyone point me to a resource, or give an opinion, as to the best practices for using stored procedures vs. views. What are the pros and cons of using either one.
|
|
|
|
|
They have two totally different purposes.
Stored procedures/functions/packages are best used for executing a(n) operation(s) on a set (or subset) of data. A view is a presentation device best used to offer existing data in a different presentation format. Doing alot of programatic work in views typically will invalidate indexes on underlying ables and slow the view down. Views should be kept fairly simple and let the SPs do the grunt transform/operation work they were designed to be good at.
Mark Conger
Sonork:100.28396
|
|
|
|
|
Excellent answer. I have yet to find anything beyond a dscription of what they are, not how or why they are used.
|
|
|
|
|
Is there any way to reboot the sqlserver in C# program?
|
|
|
|