|
Take a look at SQL-Server's "Surface Area Configuration" tool. By default SQL-Server 2005 doesn't allow connections from remote machines. You need to explitely change this setting.
|
|
|
|
|
He says he is running "an sql server 05 express sample on my [his] pc". Thus he does not need to open anything to the outside world as all parts are running on the one PC. The question appears to be a false lead, driven by the error message.
|
|
|
|
|
|
giddy_guitarist wrote: This is the connection string in the config file:
connectionString="Data Source=ONTEORA-PH0OA8I;Initial Catalog=Northwind;Integrated Security=True"
I added Server=localhost and Server=(local). Nothing.
Data Source and Server are synonyms. Pick either Data Source or Server and stick with it. I suspect Data Source trumps Server , and because you are referring to your PC by name it is attempting to use a network connection.
|
|
|
|
|
i got the sample working.
Could you just help me out with the following:
I now need a connection string that loads a database thats in the same directory as the .dll , .exe
When i connect to my database in the server explorer and check the property window , the connection string reads:Data Source=.\SQLEXPRESS;AttachDbFilename="E:\Gid\Hotel Management Studio\HotelManager.Core\DataServices\HTLDATA.mdf";Integrated Security=True;User Instance=True
Now , if i use this in SqlConnection() it works fine. Now if i change AttachDbFilename=HTLDATA.mdf. . .and then copy the .exe and the DB into another location . .it doesnt work saying "A dbase with the same name exists or the file cant be open" . So i cant copy my database and use it on the same pc? but then VS itself copies my database from the Project folder into the bin.
I found this site:http://www.connectionstrings.com/?carrier=sqlserver2005
The last section has .NET connection strings , i tried:
Attach a database file on connect to a local SQL Server Express instance
Server=.\SQLExpress;AttachDbFilename=c:\asd\qwe\mydbfile.mdf;Database=dbname;Trusted_Connection=Yes;
But this doesnt work too. Whats dbname? I tried HTLDATA(.mdf)
What sring should i use?
|
|
|
|
|
Hi!
I have three Columns. Category, Type and Item. How would I write a stored Procedure to take values in those three columns and combine them into one column?
So instead of having Category = Test, Type = Test and Item = Test, you will have one column with all the values like: Test / Test / Test.
Thanks!
Illegal Operation
Making Computer Software Talk
|
|
|
|
|
SQL Server usage
SELECT category + '/' + type + '/' + item AS colname FROM tblA
will return a "/" seperated string.
|
|
|
|
|
Hallo frends,
I want to take result from stored procedure into my Crystal report but cnt see strored procs
into my database expert of Crystal Report.
I m using vb.net & mysql 5.0 & using ODBC for connection on report which includes DSN that i made already on my machine.
But though i m check on "Show Stored procedure" under database exper->options->DataExplorer.
But not showing any stored proc yet only tables.
How should i call my stored proc in crystal RPt.
Please Tell me soon.
Thanks.
-Regards Priya.
"The Difficult i can do it now...
The Impossible will take a little longer."
|
|
|
|
|
Hi Priya,
Please tell me which version of .Net (2003 or 2005) and Crystal Report version (9 or 10) are you using??
I am currently working .Net 2005 with SQL 2000 as backend. I am not sure the same should work on MySQL.
NOTE 1 point: When adding Stored Procedure in Crystal Report, you should have only one SQL Query.
For example.
CREATE PROCEDURE Sql1
AS
BEGIN
Select * from Table1
-- Select * from Table2 (Note -- this should be commented)
END
Hope you are getting the above example. If not, please reply. I will explain in detail.
- Harini
|
|
|
|
|
Hi,
I am using the sql server for creating the database. I want to create the database which is having userid and password. This I require since I wanted to restrict acces to database and also only authorise user to database can use the userid and password created at time of creation of database.
So how can I create the database which is having userid and password?
Thanks in advance..
MikeRT
|
|
|
|
|
I think you may work with "security"
select your database and go to "security" you can there set logins.
|
|
|
|
|
CREATE TABLE [dbo].[TblLogin] (
[Name] [varchar] (50) ,
[username] [varchar] (20),
[passwd] [varchar] (20) ,
[Email] [varchar] (100)
)
GO
with Regards,
Imthiyas Ahamed.A
|
|
|
|
|
what is understand is, you are trying to create a database from your application and you want to have a valid users for it.
If so, create database, then create user and assign access permission for accessing the database.
however sa user will be able to access the new database. also any other user who have System Administrators role on other database same instance of SQL Server will be able to access the database. to my knowledge this cannot be restricted
|
|
|
|
|
Hi,
Problem is that the sql server on which i want to create the database is having some password.However as the login id to access the Master is 'sa' and which is universally fix . I can create database using master. But when I want to give userid and password to database I have created I should know the userid and password of sql server. Theirafter I can access the database and change the user of it. That's why I am tinking that if at time of creation If we assign some id and password to database it can be easy.
I think it's lot explanatory.
Mike
|
|
|
|
|
not getting exactly what you are looking for
|
|
|
|
|
I want to create database on sql server which is having it's own userid and password. The application which is going to create database on sql server do not have the user id and password of sql server. However the userid for Master database is 'sa' and password ''(blank) application can create database using master database.
Then since apllication is not aware of userid and password of sql server I am thinking that If we can give userid and password to the database at time of creation then It can be acessible to my application and also provide security as userid and password is with application only. Can it be possible?
Mike
|
|
|
|
|
what i understood & replied (my 1st reply), is for the same i.e.
1. connect to SQL Server using sa user
2. create new database
3. create new user
4. grand permissions for new user to access the new database
5. after this let application use the new user for accessing the data.
|
|
|
|
|
How to write the sql statement using COUNT ...
give me example...
|
|
|
|
|
i got the answer thanks...
|
|
|
|
|
|
Hi!
I have a problem with my ODBC Adapters
The Adapter dont create a Update or Delete Statement. I get the error
update/delete "Could not determine which columns uniquely identify the rows for ...."
The MS Access Database behind has a primary key with autonumber in each Table, so there is a column with an unique identifier.
I couldn't get rid of this problem so far!...
When i use an OLEDB Adapter it works perfectly...but i have to use ODBC..
did anyone had the same problems so far?
please help!
|
|
|
|
|
Are you using the SQL command builder class to create your adapter?
|
|
|
|
|
Good morning freinds,
i m trying to create following procedure in mysql5.0 but getting error abt check syntax in sql statement on 2nd column i.e. at sum(Tuesday).
Monday & Tuesday are two columns of which i wnt to display sum of all records of Monday & tuesday so i wrote following procedure but Error??
As I tried already, i selected sum of other 2 columns at a time in one select stmt, but it is also giving error at 2nd column.
In simple query i can select sum of more than one columns but why not in procedure?
Anybody please help me following is the my procedure.---->
DELIMITER $$
DROP PROCEDURE IF EXISTS `timesheet`.`sp_select` $$
CREATE PROCEDURE `sp_select`()
BEGIN
DECLARE mon,tue double;
SELECT sum(Monday) into mon , sum(Tuesday) as tue FROM timesheet_nonbillables;
SELECT mon,tue;
END $$
DELIMITER ;
What should i change in it to run properly.
Please Reply Soon.
Thanx.
-Regards Priya.
"The Difficult i can do it now...
The Impossible will take a little longer."
|
|
|
|
|
SELECT sum(Monday) into mon , sum(Tuesday) as tue FROM timesheet_nonbillables;
I haven't run this query and tested
May be this could be the reason:
sum(Monday) into mon - variable mon has been assigned
sum(Tuesday) as tue - It is pseudo column won't that be sum(Tuesday) into tue
|
|
|
|
|
hai priya,
you have not added Group by keyword in that, is that may be problem?
using aggregate functions without groupby may also create problems.
change that and try...
Cheers
asithangae
|
|
|
|