|
I don't understand what you mean by "Build" a database as opposed to "create" a database?
|
|
|
|
|
Ok , Sorry for ambiguity.
what I mean here is: we can develop our own datsbase same like that of MS Access
Develop2Program & Program2Develop
|
|
|
|
|
Navneet Hegde wrote: we can develop our own datsbase same like that of MS Access
If you want. I don't, personally, see the need as many highly skilled people who are well versed in the theory and implementation of database systems created things like MS Access, SQL Server and the like. Microsoft spends billions of dollars on creating those pieces of software and I'm sufficiently aware of my own abilities to realise that I could no where near match what they do.
|
|
|
|
|
You want to build your own database server ? Or, you want to build your own front end generator for databases from a variety of sources ?
This belongs in teh C++ section, I can't imagine doing it in any other language, and SQL and ADO are not going to help you.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: This belongs in teh C++ section, I can't imagine doing it in any other language, and SQL and ADO are not going to help you.
Well, VistaDB was written in C# so it isn't impossible.
Also, when he writes his database software he'll most likely want to be able to access it in a .NET application so he's going to have to write a provider for it.
|
|
|
|
|
Colin Angus Mackay wrote: Well, VistaDB was written in C# so it isn't impossible.
No, but probably stupid, if he wants it to perform and scale as well as Access or SS ( not that they scale as well as each other )
Colin Angus Mackay wrote: Also, when he writes his database software he'll most likely want to be able to access it in a .NET application so he's going to have to write a provider for it.
That's what C++/CLI is for.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
yes building such things is work of master's,but everything is Build upon simple basic laws,I only want that basic Idea behind it. how its Build.
Develop2Program & Program2Develop
|
|
|
|
|
Navneet Hegde wrote: I only want that basic Idea behind it. how its Build.
Well, if you just want to know how it is done, why not look at the source for some open source databases. Do a search for SQLite or MySQL. If you want to be more esoteric and go for an object oriented database then search for db4o.
|
|
|
|
|
Thanks a lot.So I get to see the source behind of mysql.
Please do guide me how can I get to see the source behind of Mysql
[any URL's]
Thanks a bunch to Christian and Colin
Have a wonderful weekend.
Navneet Hegde
India
Develop2Program & Program2Develop
|
|
|
|
|
Navneet Hegde wrote: Please do guide me how can I get to see the source behind of Mysql
[any URL's]
Have you thought of doing an internet search for it: MySQL Source Code[^]
The search results above will give you links to documentation of the Source Code as well as the source code itself.
|
|
|
|
|
|
SELECT MIN(BankID) AS DBComboValue, (BankSortCode) As DBComboText, BankName, BankAddress3<br />
FROM tblBanks <br />
WHERE BankSortCode LIKE @Query<br />
AND BankActive = 1<br />
GROUP BY BankSortCode, BankName, BankAddress3<br />
ORDER BY BankSortCode ASC<br />
<br />
Return @@RowCount
I have the following code to retrieve a count of rows in a result set. It works but I don't want the result set to be returned. All I want is the RowCount. My original approach was to use COUNT in the main query but I couldn't seem to get this working due to the grouping I perform. Therefore I decided to use @@RowCount and hence my current problem.
Thanks in advance.
|
|
|
|
|
Remove all the items from the SELECT list and replace with COUNT(*) . Remove the ORDER BY clause.
If the grouping causes a problem, do it as a subquery
SELECT COUNT(*) FROM (SELECT ... )
You can then access the value using ExecuteScalar from your application.
|
|
|
|
|
<br />
SELECT COUNT(*) FROM (SELECT MIN(BankID) AS DBComboValue, (BankSortCode) As DBComboText, BankName, BankAddress3<br />
FROM tblBanks <br />
WHERE BankSortCode LIKE @Query<br />
AND BankActive = 1<br />
GROUP BY BankSortCode, BankName, BankAddress3)
Thanks for that Colin. I hadn't thought of the subquery approach. I tried it though and couldn't seem to get it to work. Got the following error
Incorrect syntax near the keyword 'END'.
As in the 'END' that come right after it to finish the Stored Procedure. Any ideas?
|
|
|
|
|
Hi,
Please post your whole stored procedure.....
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
set ANSI_NULLS ON<br />
set QUOTED_IDENTIFIER ON<br />
GO<br />
ALTER PROCEDURE [dbo].[DropDownCombo_Banks_Lookup_Count]<br />
-- Add the parameters for the stored procedure here<br />
@Query As nvarchar(100)<br />
AS<br />
BEGIN<br />
<br />
--SELECT Count(DISTINCT CONVERT(nvarchar(100), BankSortCode) + BankName + BankAddress3) AS RowCounter<br />
--FROM tblBanks<br />
--WHERE BankSortCode LIKE @Query<br />
--AND BankActive = 1;<br />
<br />
SELECT COUNT(*) FROM (SELECT MIN(BankID) AS DBComboValue, (BankSortCode) As DBComboText, BankName, BankAddress3<br />
FROM tblBanks <br />
WHERE BankSortCode LIKE @Query<br />
AND BankActive = 1<br />
GROUP BY BankSortCode, BankName, BankAddress3)<br />
END
|
|
|
|
|
Change the last line of your select to
GROUP BY BankSortCode, BankName, BankAddress3) A You need to assign a table alias.
|
|
|
|
|
Oh of course. Thanks for that guys. Working fine now
|
|
|
|
|
Hi to All,
I want to Delete all Tables in a MS Access DataBase.
how do i delete all talbes in a database using Query ?
please help me.
Pavan Pareta
|
|
|
|
|
|
Huh???
I've had the same question, as during development, I frequently rebuild the db from scratch. At first I was going thru and manually deleting all tables and queries. Now I just use windows and delete the file, then build a new one via the Access user interface. If there is a one-step approach to deleting everything (DROP SCHEMA perhaps), I'd like to know so I can use it.
Unless "TableName" is a synonym for "every table in the database", I don't really think "DROP TABLE TableName" will work. But then, I haven't tried it either...
|
|
|
|
|
DQNOK wrote: Unless "TableName" is a synonym for "every table in the database", I don't really think "DROP TABLE TableName" will work. But then, I haven't tried it either...
The OP wanted to know how to delete (drop) tables from a database. The command I gave will allow him to drop a table. "TableName" is a placeholder for the name of the table to drop.
|
|
|
|
|
I don't think you can do this with a query. I think you'll have to code it in a function. If it were possible, the query would look something like:
DROP TABLE (SELECT Name FROM MSysObjects WHERE Type=1 AND Name NOT LIKE 'MSys%');
How to put this into a function should be pretty obvious now: you run the inner query to get all the tablenames (DO NOT delete the MSys___ tables; although I doubt you could anyway) into a record set, then loop thru the record set with:
"DROP TABLE " & recordset!Name & ";"
Note that Access doesn't like to drop tables that have relationships on them, so this may not work unless you first delete the relationships.
Hope this helps.
David
|
|
|
|
|
Hi Friends,
i have data like this.......
number
--------------
123
234
3435
5656
i want to display column wise data in one row like this...
number
---------------
123,234,3435,5656
kindly tell me the solution for this? urgent
|
|
|
|
|
allisha wrote: i want to display column wise data in one row like this...
number
---------------
123,234,3435,5656
Read the data back and format a string appropiately. e.g.
bool isFirst = true;
StringBuilder sb = new StringBuilder();
SqlDataReader reader = myCommand.ExecuteReader();
while(reader.Read())
{
if (isFirst)
isFirst = false;
else
sb.Append(",");
sb.Append(reader.GetInt(0).ToString());
}
string displayResult = sb.ToString();
|
|
|
|