|
In its simplest form:
select requiredcolumn from table where column like '%age%'
will do the job.
Dave.
|
|
|
|
|
Thanks dear!!
I started with nothing,
And I still have lots of it left with me.
|
|
|
|
|
I have two tables in my MS-Access database.
TableA has list of the doctors and attached clinics, address etc.
TableB has the list of hospitals, address etc.
The problem is the address,phone etc are repeating data in both the tables. The tables are very big 400 and 600 data respectively. Any way to link the database and gat the stuff working soon, and have the same table names respectively.
I access them using my ASP page.
I started with nothing,
And I still have lots of it left with me.
|
|
|
|
|
Add autonumber primary key to TableA,then add foreign key to TableB and put its reference as TableA.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Mazdak wrote:
Add autonumber primary key to TableA
It is already like that....
Similar is the TableB. Now how do I change that one?? and
Mazdak wrote:
put its reference as TableA.
How to do it in Ms-Access???
I started with nothing,
And I still have lots of it left with me.
|
|
|
|
|
SPS wrote:
How to do it in Ms-Access???
Errrrr,I don't know so much about Access,but I think it must have it.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Mazdak wrote:
I think it must have it.
I wish it has the feature!
I started with nothing,
And I still have lots of it left with me.
|
|
|
|
|
I am verymuch new to SQL-Server applications....
All the time, I have managed to do my database with the MS-ACCESS itself. And trying to pick the SQL... as I just identified that my website supports that too. And got the stuff installed in my PC now.... It says... SQL Server 2000... I want to use it with my HTML/ASP applications
My question is.... WHERE DO I START???
What should I do to configeure with my local IIS?
What Should I do to create my database?
How do I create table??
How do I upload to my site??
Any article to explain to this new-to-SQL preson??
Thanks in advance....
I started with nothing,
And I still have lots of it left with me.
|
|
|
|
|
SPS wrote:
What should I do to configeure with my local IIS?
Nothing unless you want to use SQLHTTP, but I think that is out of your scope right now.
SPS wrote:
What Should I do to create my database?
Since you have SQL Server 2000 installed use the Enterprise Manager. Look in the database section of this site or use the Books Online for SQL Server.
SPS wrote:
How do I create table??
Same as above
SPS wrote:
How do I upload to my site??
You don't upload the database to your site. Your pages connect to the database using such things like SqlConnection and SqlCommand
|
|
|
|
|
Mark Nischalke wrote:
Your pages connect to the database using such things like SqlConnection and SqlCommand
I dont own the site... I mean... the rented web-space. So the database should be uploaded is it?? Should I upload the corresponding .mdf file??
I started with nothing,
And I still have lots of it left with me.
|
|
|
|
|
Remeber that SQL Server is not like Microsoft Access. Microsoft Access is a file base database. Everything you need is contained in the database file. SQL Server is on a server based architecture. Although there is a file(s) related to the databases withing SQL Server, they are not the same as the Access files. In order to get data from a SQL Server, you must connect to the Server. If you have SQL Server on your personal machine at home, then it would have connected to the internet at all times in order for you to access it. If this is not an option, then you need to check with your service provider to see if they have SQL Server installed.
Jeremy
Jeremy Oldham
|
|
|
|
|
Jeremy Oldham wrote:
if they have SQL Server installed.
The sql server is inatalled... I will ask them the details then!
I started with nothing,
And I still have lots of it left with me.
|
|
|
|
|
I am looping through all Columns in a Table using SQLDMO. I need to ouput both the datatype and the length of that datatype. That is pretty simple, the problem comes when the DataType is bit , int etc. These DataTypes in a Stored Procedure parameter declaration must not have their lengths specified. But DataTypes like navarchar must have it declared.
Now I could do a long and ugly switch/if statement which filters out the bit s and int s but it seems, well, long and ugly.
Is there a way to programaticaly check if the DataType must have it's length declared or not in SQLDMO or .NET?
ta
Paul Watson Bluegrass Cape Town, South Africa Christopher Duncan wrote:
Which explains why when Santa asked, "And what do you want for Christmas, little boy?" I said, "A life." (Accesories sold separately)
|
|
|
|
|
AFAIK:decimal needs scale and precision;float needs size;char , varchar , nchar and nvarchar need size;- Everything else doesn't.
One thing you may run in to: nvarchar with a size of 1,073,741,823 is actually ntext , and varchar with a size of 2,147,483,647 is actually text . I've seen the problem with ADO and ADO.NET, so SQLDMO may be affected as well.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Richard_D wrote:
Everything else doesn't
Thanks for the info Richard, much appreciated (I forgot about the scale and precision.)
What I realised was it was easier to do the if/switch based on what DOES need length/scale/precision declaration rather than what does not.
Also I still have not found a programatic way of testing which SQLDBTypes need it declared and which do not. It makes the nice enumerable SqlDBType list in .NET much less useful.
Thanks again.
Paul Watson Bluegrass Cape Town, South Africa Christopher Duncan wrote:
Which explains why when Santa asked, "And what do you want for Christmas, little boy?" I said, "A life." (Accesories sold separately)
|
|
|
|
|
Under the Server Explorer in VS.NET, under "SQL Servers" I would like to add the Northwind database. How do I do this? I have VS.NET and SQL Server v7 installed.
Thanks in Advance!
Derek
|
|
|
|
|
You add it under data connections not servers. Right click and Add Connection... Follow the instruction.
|
|
|
|
|
Um, I believe Add Connection will connect you to a new server. I haven't played much with VS.NET explorer much though.
Do you have a full version of SQl Server or just client tools installed? normally northwind is installed by default unless you tell it not to. If you install MSDE I don't think you get it either. Best case, if you don't have it on your registered SQL server, youc an install it. There is a script called instnwnd.sql that lived in the mssql/install directory under your mase Sql server directory. running that puppy will create (or refresh) Northwind for you.
Mark Conger
Sonork:100.28396
|
|
|
|
|
Thanks - now onto the new problem...
Under the Connection tab:
1. Chose my server
2. Use Windows NT Integrated security
3. Attached a database file
* Name = Northwind
* Filename = path to Northwind database
When I select the Test Connection button, I get the following message:
---------------------------
Microsoft Data Link Error
---------------------------
Test connection failed because of an error in initializing provider. The header for file 'C:\Northwind.mdb' is not a valid database file header. The FILE SIZE property is incorrect.
---------------------------
OK
---------------------------
Any ideas? Is this because Northwind is an Access database?
|
|
|
|
|
Are you trying to use SQL Server version of Northwind or Access.
On the Data Link Properties dialog check what provider your using.
|
|
|
|
|
I'm using the Northwind database that came with Microsoft Office XP. The actual filename is "Northwind.mdb". I'm assuming it's an Access database. Can SQL Server connect to Access databases? Is there a converted Northwind database for SQL Server? Forgive my ignorance on this, I've never worked with SQL Server before.
On the Provider tab, I was selecting "Microsoft OLEDB Provider for SQL Server" - maybe that's my problem. I was trying to follow an example in the book "A Programmer's Guide to ADO.NET in C#" and the author was demonstrating an example using the VS.NET Server Explorer and his screenshots showed the Northwind database already added. That's what prompted by postings.
BTW - Thanks for all your help!
|
|
|
|
|
If you run the install script I mentioned it will create a SQL server northwind DB. The Access Northwind won't mount under SQL Server (Wrong kind of header block)not to mention SQL Server 2K is older than Office XP.
Mark Conger
Sonork:100.28396
|
|
|
|
|
Unfortunately, I couldn't find any Northwind upgrade SQL script. I'm in the process of downloading SQL Server 2000 right now (I only had SQL Server 7).
Another embarrassingly very simple question - once I have the upgrade Northwind SQL script, how do I launch SQL Server to execute it?
|
|
|
|
|
In your original post you said you have SQL Server 7 installed. Why are you trying to use an Access version of Northwind then? On the provider tab you need to select "Microsoft Jet 4.0 OLE DB Provider".
"Microsoft OLEDB Provider for SQL Server" is for connecting to a SQL Server database which you appear not to be doing.
Do you understand the differences between providers?
|
|
|
|
|
Yes - I do understand the differences between providers. I was a little confused about the book I was following since the author used the Northwind database with SQL Server. I (brashly) assumed that Microsoft had made the Access and SQL Server database compatible.
Thanks for the help!
|
|
|
|