Showing posts with label connect. Show all posts
Showing posts with label connect. Show all posts

Friday, March 30, 2012

Populate arraylist from a database

Hi

i'm pretty new to this, how do i connect to my database a put all the values from one column into the arraylist.

Any help and a easy example would be nice

Thanks in advance

Richard

check out this sample, fromASPNet101.com:

http://aspnet101.com/aspnet101/aspnet/codesample.aspx?code=ddlArrayList

|||thanks i give it a go|||

hi i get an error

An error has occurred while establishing a connection tothe server. When connecting to SQL Server 2005, this failure may becaused by the fact that under the default settings SQL Server does notallow remote connections

heres my code

<%@. Page Language="VB" %
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<%@. Import Namespace="System.Data" %>
<%@. Import Namespace="System.Data.SQLClient" %>
<html>
<head>
<meta name="GENERATOR" Content="ASP Express 2.1">
<title>Untitled</title>
<script language="VB" runat="server">
Dim MyArrayList as ArrayList
Dim sItem as String
Sub Page_Load(Source as Object, E as EventArgs)
MyArrayList=New Arraylist
if not Page.IsPostBack then
Dim strConn As String = "server=YourServer;uid=UID;pwd=PWD;database=Holiday"
Dim MySQL As String = "SELECT startDate FROM holidayRequest"
Dim MyConn as New SQLConnection(strConn)
Dim objDR as SQLDataReader
Dim Cmd as New SQLCommand(MySQL, MyConn)
MyConn.Open()
objDR=Cmd.ExecuteReader(system.data.CommandBehavior.CloseConnection)
While objDR.Read()
MyArrayList.Add(objDR("startDate"))
End While
end if
ddl1.datasource=MyArrayList
ddl1.databind
End Sub
</script>
</head>
<body
<Form id="form1" runat="server">
<asp:DropDownList id="ddl1" runat="server" />
</Form>
</body>
</html>

the database i'm connecting too is on my computer and is called Holiday.mdf and the table i'm trying to get too is holidayRequeststart and from that i'm trying to get the startDate out.

Please help i'm new to this and prob done a stupid erro

|||Make sure your connection string is pointing to an available SQL instance on your computer. If you're using a default SQL instance, it'ok to refer to it using server=YourServer; if it is a named SQL instance, you can set server to something likeYourServer\SQLInstanceName.

Wednesday, March 28, 2012

Poor import support Re: Connect vb express to SQL2005 Developer ed?

Excuse the cross post (to VBexpress fourum) but maybe someone here will have a different take?

have searched all around can't seem to see how to configure a SQL2005 developer ed so I can use vb express to develop a local front end. keep getting "the user instance login flag is not supported on this version of sql server" I have configured the .net framework via aspnet_regsql.exe. Also I configured the "Machine.config" file. but so far no luck.

Selecting sql2005 as the server thru the add new database connection in advanced area yields the error message

surely there is away.

So far still no joy,

While Scotty indicates that the connection to SQL2005 is intentionally hampered other posters indicate that the user instance problem can be solved by running the .net config tool to add the asp database to sql server, which I have done.

However this does not yet work.

I cannot get the code to spark yet.

Again my configuration cannot be any simpler. sql express sp1 and sqldeveloper on the same machine using windows security (all installed with default cofigurations)

In the absence of other ideas I may try to get sql express downloaded and going, I'm not sure what issues that will present re: what I'm trying to develop.

I'm trying to develop the skills to replace some fairly involved reporting and some user table interface that I had going in access2003, I hate to pruchace a big piece of sw when I don't know if it will remove the current roadblocks...

Appreciate the help here, but doesn't someone have a "simpler" complete answer? I.e. one that would get the developer database to accept the connection wizard? (user instance issue)

Hi,

1). Are you able to Log In using Windows User Login credential on your SQL Server machine?

2). Have you cross check connection string?! Refer http://www.connectionstrings.com/

3). Is remote access , tcp/ip,named pipe are enabled and running properly?

4). SQL Server Browser service is running ?

5). Have check for any dependency service has problem?

6). RPC Service is running?

7). Have you check with Firewall settings?

8). Can both machine (Server/Client) ping each other?

9). What error message you got ?

Hemantgiri S. Goswami

|||

The following answers and eliminates many of the questions you pose...

I guess that MS doesn't want this envionment option to exist?

If you could answer I think it would solve a number of hanging queries.

Thank you for responding, I have temporarily given up on this quest since I have to get some real work done! ;') I went ahead and downloaded sql express and fidled a bit and now have it running with vb express and sql developer but it appears that the barriers are fairly high between the two enviornments...

Assume I want to start from scratch, one machine.....

Not answereing your questions precisely but asking a new one. With everthing operating on one machine under windows authentication using the default installation options for each product, what would be the correct (best) way to get the vb express to talk to sql developer?

Also it would be great to have the sql management studio be able to move the tables between the two environments...

All I'm trying to do is get the "best" developoment environment I can at a low cost.

|||

hi,

tomdart wrote:

Excuse the cross post (to VBexpress fourum) but maybe someone here will have a different take?

have searched all around can't seem to see how to configure a SQL2005 developer ed so I can use vb express to develop a local front end. keep getting "the user instance login flag is not supported on this version of sql server" I have configured the .net framework via aspnet_regsql.exe. Also I configured the "Machine.config" file. but so far no luck.

...

Appreciate the help here, but doesn't someone have a "simpler" complete answer? I.e. one that would get the developer database to accept the connection wizard? (user instance issue)

Visual Studio Express editions designers are "designed" to use only "file based" connections and thus User Instances features... you can connect to SQL Server engine (Developer edition as well), but only by code and not via the designers..

regards

|||

Andrea Montanari wrote:

hi,

tomdart wrote:

Excuse the cross post (to VBexpress fourum) but maybe someone here will have a different take?

have searched all around can't seem to see how to configure a SQL2005 developer ed so I can use vb express to develop a local front end. keep getting "the user instance login flag is not supported on this version of sql server" I have configured the .net framework via aspnet_regsql.exe. Also I configured the "Machine.config" file. but so far no luck.

...

Appreciate the help here, but doesn't someone have a "simpler" complete answer? I.e. one that would get the developer database to accept the connection wizard? (user instance issue)

Visual Studio Express editions designers are "designed" to use only "file based" connections and thus User Instances features... you can connect to SQL Server engine (Developer edition as well), but only by code and not via the designers as all editions but SQLExpress do not support User Instances..

regards

|||

Just to give "official" confirmation to what Andrea has already indicate, and provide more detail...

VS Express Editions are designed to work exclusively with SQL Express in terms of creating database through the UI and including them into your project. To this end, the following is true:

When you create a database using the VS Express UI, VS verifies the version of SQL being accessed is SQL Express. Any other version will fail.|||Thanks for the confirmation, I'm only doing development, learning and testing, but the signifigant restrictions of express and developer seem to make it pretty difficult. E.G. no effective import to express and no language (VB) in developer. Hence the need to use both to develop.|||

Hi tomdart,

If you want to import from Access I suggest you check out the Migration Assistant for Access that was recently released. This will get your Access data into SQL.

Mike

|||

Thank you for your reply, the following presented in the spirit of constructive feedback.

What I was hoping to do was simply import a text file, csv which is no problem with access, but simply cannot be done in sql express. I have managed , after hours to get the import going in sql developer since I can see and modify the package, but the lousy import and poor design of defaults makes the text import of express vitually a deal killer for my use. I may resort to import to access then import to express, but that seems like a sub optimal solution! I would add that native ssis in sql-developer is no champ to work with either. I don't get why the sophisticated folks at msft could not have either ssis or text import of SQL work as intellegently as Access. It seems that the defaults and error handeling just arn't as well set up, perhaps a "default mode" (which could be more intellegent or forgiving) of some sort could be added? As it now stands I regard this area as the "worst" from an everyday use perspective.

As to SSIS in sql developer, (and hence the big sql) I can't even find good doccumentation on how to modify a wizzard generated ssis package, The generated XML appears to be fairly inscrutable, and undoccumented.

|||

Hi tomdart,

Thanks for the feedback. I wasn't here when they made the decision to remove Import/Export from Express and I'm working to having at least in import solution in the next version. Your comments will help support my claim.

As another alternative I can suggest the BCP utility which can handle import and export of text based data.

Mike

Poor import support Re: Connect vb express to SQL2005 Developer ed?

Excuse the cross post (to VBexpress fourum) but maybe someone here will have a different take?

have searched all around can't seem to see how to configure a SQL2005 developer ed so I can use vb express to develop a local front end. keep getting "the user instance login flag is not supported on this version of sql server" I have configured the .net framework via aspnet_regsql.exe. Also I configured the "Machine.config" file. but so far no luck.

Selecting sql2005 as the server thru the add new database connection in advanced area yields the error message

surely there is away.

So far still no joy,

While Scotty indicates that the connection to SQL2005 is intentionally hampered other posters indicate that the user instance problem can be solved by running the .net config tool to add the asp database to sql server, which I have done.

However this does not yet work.

I cannot get the code to spark yet.

Again my configuration cannot be any simpler. sql express sp1 and sqldeveloper on the same machine using windows security (all installed with default cofigurations)

In the absence of other ideas I may try to get sql express downloaded and going, I'm not sure what issues that will present re: what I'm trying to develop.

I'm trying to develop the skills to replace some fairly involved reporting and some user table interface that I had going in access2003, I hate to pruchace a big piece of sw when I don't know if it will remove the current roadblocks...

Appreciate the help here, but doesn't someone have a "simpler" complete answer? I.e. one that would get the developer database to accept the connection wizard? (user instance issue)

Hi,

1). Are you able to Log In using Windows User Login credential on your SQL Server machine?

2). Have you cross check connection string?! Refer http://www.connectionstrings.com/

3). Is remote access , tcp/ip,named pipe are enabled and running properly?

4). SQL Server Browser service is running ?

5). Have check for any dependency service has problem?

6). RPC Service is running?

7). Have you check with Firewall settings?

8). Can both machine (Server/Client) ping each other?

9). What error message you got ?

Hemantgiri S. Goswami

|||

The following answers and eliminates many of the questions you pose...

I guess that MS doesn't want this envionment option to exist?

If you could answer I think it would solve a number of hanging queries.

Thank you for responding, I have temporarily given up on this quest since I have to get some real work done! ;') I went ahead and downloaded sql express and fidled a bit and now have it running with vb express and sql developer but it appears that the barriers are fairly high between the two enviornments...

Assume I want to start from scratch, one machine.....

Not answereing your questions precisely but asking a new one. With everthing operating on one machine under windows authentication using the default installation options for each product, what would be the correct (best) way to get the vb express to talk to sql developer?

Also it would be great to have the sql management studio be able to move the tables between the two environments...

All I'm trying to do is get the "best" developoment environment I can at a low cost.

|||

hi,

tomdart wrote:

Excuse the cross post (to VBexpress fourum) but maybe someone here will have a different take?

have searched all around can't seem to see how to configure a SQL2005 developer ed so I can use vb express to develop a local front end. keep getting "the user instance login flag is not supported on this version of sql server" I have configured the .net framework via aspnet_regsql.exe. Also I configured the "Machine.config" file. but so far no luck.

...

Appreciate the help here, but doesn't someone have a "simpler" complete answer? I.e. one that would get the developer database to accept the connection wizard? (user instance issue)

Visual Studio Express editions designers are "designed" to use only "file based" connections and thus User Instances features... you can connect to SQL Server engine (Developer edition as well), but only by code and not via the designers..

regards

|||

Andrea Montanari wrote:

hi,

tomdart wrote:

Excuse the cross post (to VBexpress fourum) but maybe someone here will have a different take?

have searched all around can't seem to see how to configure a SQL2005 developer ed so I can use vb express to develop a local front end. keep getting "the user instance login flag is not supported on this version of sql server" I have configured the .net framework via aspnet_regsql.exe. Also I configured the "Machine.config" file. but so far no luck.

...

Appreciate the help here, but doesn't someone have a "simpler" complete answer? I.e. one that would get the developer database to accept the connection wizard? (user instance issue)

Visual Studio Express editions designers are "designed" to use only "file based" connections and thus User Instances features... you can connect to SQL Server engine (Developer edition as well), but only by code and not via the designers as all editions but SQLExpress do not support User Instances..

regards

|||

Just to give "official" confirmation to what Andrea has already indicate, and provide more detail...

VS Express Editions are designed to work exclusively with SQL Express in terms of creating database through the UI and including them into your project. To this end, the following is true:

When you create a database using the VS Express UI, VS verifies the version of SQL being accessed is SQL Express. Any other version will fail.|||Thanks for the confirmation, I'm only doing development, learning and testing, but the signifigant restrictions of express and developer seem to make it pretty difficult. E.G. no effective import to express and no language (VB) in developer. Hence the need to use both to develop.|||

Hi tomdart,

If you want to import from Access I suggest you check out the Migration Assistant for Access that was recently released. This will get your Access data into SQL.

Mike

|||

Thank you for your reply, the following presented in the spirit of constructive feedback.

What I was hoping to do was simply import a text file, csv which is no problem with access, but simply cannot be done in sql express. I have managed , after hours to get the import going in sql developer since I can see and modify the package, but the lousy import and poor design of defaults makes the text import of express vitually a deal killer for my use. I may resort to import to access then import to express, but that seems like a sub optimal solution! I would add that native ssis in sql-developer is no champ to work with either. I don't get why the sophisticated folks at msft could not have either ssis or text import of SQL work as intellegently as Access. It seems that the defaults and error handeling just arn't as well set up, perhaps a "default mode" (which could be more intellegent or forgiving) of some sort could be added? As it now stands I regard this area as the "worst" from an everyday use perspective.

As to SSIS in sql developer, (and hence the big sql) I can't even find good doccumentation on how to modify a wizzard generated ssis package, The generated XML appears to be fairly inscrutable, and undoccumented.

|||

Hi tomdart,

Thanks for the feedback. I wasn't here when they made the decision to remove Import/Export from Express and I'm working to having at least in import solution in the next version. Your comments will help support my claim.

As another alternative I can suggest the BCP utility which can handle import and export of text based data.

Mike

Wednesday, March 21, 2012

Pocket PC is not connection to MSDE database

I want to connect a MSDE database exists in the desktop from Pocket pc 2003 application developed using vb.net. It is giving sql server not found error. It is working in the pocket pc simulater. But it is not working in the pocket pc device. Connection is also working sql server 2000 database. Please help me.Want to show us the connection string?

Might help...|||cs = "data source=mypc\test;initial catalog=test;user id=sa;persist security info=False;workstation id=mypc\test;packet size=4096"|||It's not listed here (and you should post the actual one) but are you supplying a password?|||Originally posted by Brett Kaiser
It's not listed here (and you should post the actual one) but are you supplying a password?

Not supplying the password
I am not supplying the password. I have used the following entries in the setup.ini file while installing the MSDE
[Options]
INSTANCENAME=TEST
SECURITYMODE=SQL
BLANKSAPWD=1

I think i no need a password here. I have also tried with password it is giving same problem. here the code...
Dim cnfordesktop As New System.Data.SqlClient.SqlConnection

'-----------------------
' Open the desktop connection
'-----------------------
Public Function OpenConnectionForDeskTop() As Boolean
Dim cnstr As String = ConnectionStringForDeskTop()
Try
cnfordesktop = New system.Data.SqlClient.SqlConnection(cnstr)
cnfordesktop.Open()
Catch e As SqlClient.SqlException
MessageBox.Show("Error Number: " & e.Number & ", Error Message: " & e.Message & ", Command: " & cnstr, "Database ", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1)
Return False
End Try
Return True
End Function
'-----------------------
'close the connection
'-----------------------
Public Sub CloseConnectionForDesktopVM()
Try
cnfordesktop.Close()
Catch ex As Exception

End Try
End Sub
'-----------------------
'Set the connection string property
'-----------------------
Public Function ConnectionStringForDeskTop() As String
Dim cs As String = ""
cs = "data source=mypc\test;initial catalog=test;user id=sa;password=;persist security info=False;"
Return cs
End Function

Plz Help!

Hi guys
I have installed SQL 7.0 for the first time and now when I try to
connect in query analyzer I get the following error message:

Unable to connect to server \\localhost:

server:Msg17,level16,state1
[microsoft][odbc sql server driver][dbnet lib]sql server does not exist

or access denied

I have already enabled the TCP/IP
I am using windows XP service pack 2
Thanx a lot in advance for ur kind help
regards
Mr NoviceMrNovice (akhil.gupta04@.gmail.com) writes:
> I have installed SQL 7.0 for the first time and now when I try to
> connect in query analyzer I get the following error message:
> Unable to connect to server \\localhost:
>
> server:Msg17,level16,state1
> [microsoft][odbc sql server driver][dbnet lib]sql server does not exist
> or access denied
>
> I have already enabled the TCP/IP
> I am using windows XP service pack 2
> Thanx a lot in advance for ur kind help
> regards

What did you specify in Query Analyzer for server? "\\localhost"? That's
not a magic name. Try . (a single dot) or "(local)".

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspxsql

Monday, March 12, 2012

Pls Help : "Unable To Connect to Sql Server ..." from Crystal 8.0

Hi All,
I am using Crystal Report 8.0 to create report on MSDE 2000 sp3a , but
when I try to make connection Natively :
More Data Source->MiCrosoft SQL Server-> [Dialog opens]
then I type the ServerName, UserID and Password.
System hangs for a while, then I get this error :
"Unable To Connect to Sql server MyServer"
BUT IF I create system DSN (ODBC) then create the report,
it works.
Why can't I create report Natively on MSDE ?
Thank you very much for any help,
Krist
I'm not very familiar with Crystal Reports. However, since you can make an
ODBC connection, you can test if you are able to make OLEDB connections by
creating a UDL file connection. If the UDL file connection fails, then the
issue may be specific to the OLEDB driver for sql server (you want to
attempt to reinstall MDAC if that is the case).
Also, please see the KB articles below (available at
http://support.microsoft.com):
SAMPLE: How to Create a Data Link File with Windows 2000 - ID: 244659
How to troubleshoot connectivity issues in SQL Server 2000 - ID: 827422
Thanks,
Fany Vargas
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their
Microsoft software to better protect against viruses and security
vulnerabilities. The easiest way to do this is to visit the following
websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx

Pls Help - Urgent handling "-" in query

Hi,

i am using sp_addlinkedserver to connect with my another server.
Let say my current server name is anand and other server name is anand-new

now sp_addlinkedserver worked ok

Now i want to fetch some record from the anand-new server.

I am writing my query in I server (i.e. Anand)

SELECT TOP 10 * FROM anand-new.NEWSITE.DBO.Xyz_NEW

I am getting error

Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '-'.

Pls help

Its urgent

Cheers,
AnandSELECT TOP 10 * FROM [anand-new.NEWSITE.DBO.Xyz_NEW]|||Sounds like you (or your DBA) should avoid using such characters in server names! I hate seeing SQL that is full of square brackets!

Friday, March 9, 2012

PLEASE! - Login failed for user MACHINENAME\ASPNET.

Help!! I am using Sql Server 2005 Express.

I am trying to connect to it from an aspx page.

I get the error:

Cannot open user default database. Login failed.
Login failed for user 'MACHINENAME\ASPNET'.

I have added MACHINENAME\ASPNET as a user to the database I am trying to connect to using SQL Server Management Studio Express.

Why wont it let me connect?

Any help on the matter would be most welcome.

Thanks you.

Hi,
I use sql server 2000 but I had th same problem a few months ago. You should examine 2 options. First look at the groups in your windows not on the sql server and see if aspnet and guest accounts are enabled or disabled. If they are disabled pls make them enabled then delete the available aspnet account in your sql. Create again an aspnet account in your sql choosing available accounts in your windows account, dont create aspnet account by typing aspnet yourself. just choose. Finally as you know, give this account necessary permissions you need to do your work in your database. I hope this will solve the problem :)

The Ghost of PC
[ Peace in country, peace in the world]

|||

Cannot open user default database

The user you set up does not have permissions on the database you set as the users default database.

|||

ghost,

I'm a real newbie. How do I look at groups in my windows? I have the same problem, only with some databases and not others.

dennist685

|||No offense but I kind of guessed that! If you see my message you'll see that I already added the user so that wasn't the problem.

I actually changed the way I connected to the database to:

Data Source=.\SQLEXPRESS;Initial Catalog=myDb;Integrated Security=True;

previously I was using:

Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|myDb.mdf

Now, here's the wiered thing. If I connect using the top method, it works and I'm connecting as machinename/ASPNET.

If I use the second connection string, I'm still connecting as machinename/ASPNET but the login fails.

So, if anyone can explain that, I'd be interested to know why it happens. I've set up machinename/ASPNET as a user so that ISN'T the problem as it lets me connect using the top connection string. It seems to be when I use the bottom method for connecting that I get the error even though I know that machinname/ASPNET is set up as a user on the database.

Please vote/validate SQL SSAS bugs on connect.microsoft.com

Folks,

It might help to get SQL 2005 issues addressed in more expedited fashion if we go to https://connect.microsoft.com/SQLServer (Click where it says "1. Click Feedback here" to enter feedback area.
search for analysis services bugs
review bugs that are filed
rate bugs by votingvalidate bugs that you've seen.

This is an excellent suggestion.

If you have any problem you are seeing, please go to the Connect (http://connect.microsoft.com/sql) and please file it.

Please make sure you describe problem in much detail as possible so we can reproduce it. Every problem filed is getting looked at. It is very important that problem description is accurate. Leave your contact information in case you'd like to get notificaitons about the problem. If you still concerned, feel free to post on this forum. Members of Analysis Services team are looking at your questions and concerns and will try to help you.

Edward Melomed.
Program Manager. SQL Server Analysis Services.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Please verify SQL Server is running and check your SQL

Hi,
The EU is trying to connect to the SQL Server database
through EM at her desk and she gets the following error
message.
"A connection could not be established to [SERVER NAME] -
specified driver could not be loaded due to system error
126 (SQL Server).
Please verify SQL Server is running and check your SQL
Servcer registration properties (by right-clicking on the
SERVER node) and try again."
These were the steps that were taken to ensure that the
above error could be resolved but invain......
1. Uninstalled SQL SERVER Enterprise Manager on Customers
PC and
reinstalled it - This did not help. Still getting the
following error
message.
(See attached file: sql server error.jpg)
2. Based on some of the information I tried searching for
sqlsrv32.dll file
location and were it was referencing in the registry and
found that it was
referencing to a drive mapping called S:\HR750
\crwxxx\sqlsrv32.dll - This
drive was formerly a people soft mapping which the
customer was using so, I
changed the registry settings to point to the dll file
which resided in
C:\WINNT\SYSTEM32 location, but that also did not help.
3. Made sure that all her patches and MDAC were proper and
fully patched.
Updated it but neither did this help.
4. Checked to see see whether Login Timeout could be
changed from default
of 4 to 8, but was unsuccessful int getting into that
options on the EM.
5. It looks more that some dll is corrupt which is causing
this problem on
the customres PC. I tried accessing ODBC Settings and
selected SQL Server
Driver and I get the following error message
"The setup routines for the SQL Server ODBC driver should
not be loaded due
to system error code 126"
and when I click on "OK", I get the next screen which has
a title
Driver's ConfigDSN, ConfigDriver, or Config Translator
failed
"Could not load the setup or translator library"
It sounds like a corrupt MDAC installation. Reinstalling the current
version of MDAC is a tricky proposition. If you have not upgraded to MDAC
2.8 on this machine you could do that and more than likely resolve this
problem.
Rand
This posting is provided "as is" with no warranties and confers no rights.

Saturday, February 25, 2012

Please help...can not connect to sql server 2005

I used to work on sql server 2005 on hosted on virtual pc 2004 with windows
2000 server as guest operating system on Windows XP professional as host
operating system.
No matter how much ram I threw at it, it was very slow.
I decided to wipe out the notebook and install Windows 2000 with service
pack 4.
Then I installed sql server 2005. Rebooted the machine and I am getting the
following error.
After googling, I went into sql server configuration manager and double
checked that tcp/ip was enabled under sql native client
configurationn/client protocols.
I am the admin on this computer.
I tried to run the sql server surface configuration and I get the following
error:
TITLE: Surface Area Configuration
--
No SQL Server 2005 components were found on the specified computer. Either
no components are installed, or you are not an administrator on this
computer. (SQLSAC)
BUTTONS:
OK
--
My Machine configuration is as follows:
==================
mobile intel pentium 4 cpu 2.8 ghz
at/at compatible
2 gig ram
===============
Inside sql server management studio, When I try to connect to sql server I
get the following error message
error message:
TITLE: Connect to Server
--
Cannot connect to mars.
ADDITIONAL INFORMATION:
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the fact
that
under the default settings SQL Server does not allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to
SQL Server) (Microsoft SQL Server, Error: 2)
For help, click:
http://go.microsoft.com/fwlink?Prod...=2&LinkId=20476
BUTTONS:
OK
--BTW... this has to do with November RTM release as follows Version: 9.00.139
9
Executable x86.
Please help and I thank you in advance.
"sqlster" wrote:

> I used to work on sql server 2005 on hosted on virtual pc 2004 with window
s
> 2000 server as guest operating system on Windows XP professional as host
> operating system.
> No matter how much ram I threw at it, it was very slow.
> I decided to wipe out the notebook and install Windows 2000 with service
> pack 4.
> Then I installed sql server 2005. Rebooted the machine and I am getting th
e
> following error.
> After googling, I went into sql server configuration manager and double
> checked that tcp/ip was enabled under sql native client
> configurationn/client protocols.
> I am the admin on this computer.
> I tried to run the sql server surface configuration and I get the followin
g
> error:
> TITLE: Surface Area Configuration
> --
> No SQL Server 2005 components were found on the specified computer. Either
> no components are installed, or you are not an administrator on this
> computer. (SQLSAC)
> --
> BUTTONS:
> OK
> --
>
> My Machine configuration is as follows:
> ==================
> mobile intel pentium 4 cpu 2.8 ghz
> at/at compatible
> 2 gig ram
> ===============
> Inside sql server management studio, When I try to connect to sql server I
> get the following error message
> error message:
> TITLE: Connect to Server
> --
> Cannot connect to mars.
> --
> ADDITIONAL INFORMATION:
> An error has occurred while establishing a connection to the server.
> When connecting to SQL Server 2005, this failure may be caused by the fact
> that
> under the default settings SQL Server does not allow remote connections.
> (provider: Named Pipes Provider, error: 40 - Could not open a connection
to
> SQL Server) (Microsoft SQL Server, Error: 2)
> For help, click:
> http://go.microsoft.com/fwlink?Prod...=2&LinkId=20476
> --
> BUTTONS:
> OK
> --
>|||I forgot to mention that this is a Microsoft SQL Server 2005 Enterprise
Evaluation Edition
Please help...
"sqlster" wrote:
> BTW... this has to do with November RTM release as follows Version: 9.00.1
399
> Executable x86.
> Please help and I thank you in advance.
>
> "sqlster" wrote:
>|||sqlster (nospam@.nospam.com) writes:
> After googling, I went into sql server configuration manager and double
> checked that tcp/ip was enabled under sql native client
> configurationn/client protocols.
> I am the admin on this computer.
> I tried to run the sql server surface configuration and I get the
> following error:
> TITLE: Surface Area Configuration
> --
> No SQL Server 2005 components were found on the specified computer. Either
> no components are installed, or you are not an administrator on this
> computer. (SQLSAC)
So, you can see the service in SQL Configuration Manager, but not
in Surface Area Configuration?
Very strange, and I have no idea of how this situation may have occurred.

> Inside sql server management studio, When I try to connect to sql server I
> get the following error message
Are you running Mgmt Studio from the same machine SQL Server 2005 is on,
or from a remote machine?
The only thing that I can suggest is to verify that SQL Server is actually
running. If it is, restart the service, so that any protocol changes takes
effect.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Please Help. Connecting To Server

Hi All,

I have been trawling the net to find a decent example of a way to connect to an sql 2000 server using asp.net and run a few commands.

One of the commands i need to run is: "EXEC sp_addlogin 'Albert', 'B1r12-36', 'forum2'"

Please, please, please could someone show me how to do this, and display a 'successful' message on the page if the command completed successfully...i will be eternally greatful.Hi,

This article might help:
Writing and Using Stored Procedures

Regards,|||Sorry to be thick, but after viewing that page i am still stuck.

I am not sure how to actualy connect to the server. The examples on that page show connecting to a specific database using 'trusted connections' , but what i want to do is really connect to the server using a username/password and run commands like, CREATE DATABASE.

If you could spare the time to knock up some code for me, i would be most greatful, and will even load some $ into a paypal account if you have one, just for the effort.

Monday, February 20, 2012

PLEASE HELP! Unable to connect to SQL Database from Report Man

Hi,
I am working with SQL Reporting services 2000... The report is unable to
connect to a remote datasource as I try to preview it. The database uses both
SQL and Windows Auth.
1. Created a shared datasource in my project
2. Deployed it on the server. Used OverwriteDataSource = false
3. Create a new shared datasource on the server. Gave a connection string
with no username and password.
4. Selected "Credentials stored securely in the report server" and then
entered the SQL server login and passoword there.
5. Changed the report properties in the manager to use this datasource.
6. While trying to "View" via report manager, I am getting the error message
An error has occurred during report processing. (rsProcessingAborted) Get
Online Help
Cannot create a connection to data source 'xxxx'. (rsErrorOpeningConnection)
Get Online Help
SQL Server does not exist or access denied.
CAN SOMEONE PLEASE HELP ME!!!!!!I too had this problem. The way that I fixed it was by making sure that I
could connect to the SQL server in question from the server that hosted the
reporting services website. It was the that I realized two very important
things.
1. The user profile that reporting services uses to run as a service needs
SQL server access.
2. The user profile that I entered as the login for the report needed to be
qualified with a domain name if it was a windows account.
These may not be your problem, but they were mine. I hope this helps
"PV" wrote:
> Hi,
> I am working with SQL Reporting services 2000... The report is unable to
> connect to a remote datasource as I try to preview it. The database uses both
> SQL and Windows Auth.
> 1. Created a shared datasource in my project
> 2. Deployed it on the server. Used OverwriteDataSource = false
> 3. Create a new shared datasource on the server. Gave a connection string
> with no username and password.
> 4. Selected "Credentials stored securely in the report server" and then
> entered the SQL server login and passoword there.
> 5. Changed the report properties in the manager to use this datasource.
> 6. While trying to "View" via report manager, I am getting the error message
> An error has occurred during report processing. (rsProcessingAborted) Get
> Online Help
> Cannot create a connection to data source 'xxxx'. (rsErrorOpeningConnection)
> Get Online Help
> SQL Server does not exist or access denied.
>
> CAN SOMEONE PLEASE HELP ME!!!!!!|||I confirmed this... Found out that I could connect from the Reporting
services machine to my SQL Server using the same SQL credentials...
Also gave access to the DB to the user that the Report Manager runs under...
But this still occurs.
"Nikolai Sonin" wrote:
> I too had this problem. The way that I fixed it was by making sure that I
> could connect to the SQL server in question from the server that hosted the
> reporting services website. It was the that I realized two very important
> things.
> 1. The user profile that reporting services uses to run as a service needs
> SQL server access.
> 2. The user profile that I entered as the login for the report needed to be
> qualified with a domain name if it was a windows account.
> These may not be your problem, but they were mine. I hope this helps
>
> "PV" wrote:
> > Hi,
> > I am working with SQL Reporting services 2000... The report is unable to
> > connect to a remote datasource as I try to preview it. The database uses both
> > SQL and Windows Auth.
> >
> > 1. Created a shared datasource in my project
> > 2. Deployed it on the server. Used OverwriteDataSource = false
> > 3. Create a new shared datasource on the server. Gave a connection string
> > with no username and password.
> > 4. Selected "Credentials stored securely in the report server" and then
> > entered the SQL server login and passoword there.
> > 5. Changed the report properties in the manager to use this datasource.
> > 6. While trying to "View" via report manager, I am getting the error message
> >
> > An error has occurred during report processing. (rsProcessingAborted) Get
> > Online Help
> > Cannot create a connection to data source 'xxxx'. (rsErrorOpeningConnection)
> > Get Online Help
> > SQL Server does not exist or access denied.
> >
> >
> > CAN SOMEONE PLEASE HELP ME!!!!!!|||I'm having a very similar problem, but I have two reports using the
datascource and rendering no problem and a third that gets the
rsErrorOpeningConnection error. This report previews just fine in VS, but
when not when deployed to the server. Anyone know if RS is does some sort of
credential caching?
"PV" wrote:
> I confirmed this... Found out that I could connect from the Reporting
> services machine to my SQL Server using the same SQL credentials...
> Also gave access to the DB to the user that the Report Manager runs under...
> But this still occurs.
>
> "Nikolai Sonin" wrote:
> > I too had this problem. The way that I fixed it was by making sure that I
> > could connect to the SQL server in question from the server that hosted the
> > reporting services website. It was the that I realized two very important
> > things.
> > 1. The user profile that reporting services uses to run as a service needs
> > SQL server access.
> > 2. The user profile that I entered as the login for the report needed to be
> > qualified with a domain name if it was a windows account.
> > These may not be your problem, but they were mine. I hope this helps
> >
> >
> > "PV" wrote:
> >
> > > Hi,
> > > I am working with SQL Reporting services 2000... The report is unable to
> > > connect to a remote datasource as I try to preview it. The database uses both
> > > SQL and Windows Auth.
> > >
> > > 1. Created a shared datasource in my project
> > > 2. Deployed it on the server. Used OverwriteDataSource = false
> > > 3. Create a new shared datasource on the server. Gave a connection string
> > > with no username and password.
> > > 4. Selected "Credentials stored securely in the report server" and then
> > > entered the SQL server login and passoword there.
> > > 5. Changed the report properties in the manager to use this datasource.
> > > 6. While trying to "View" via report manager, I am getting the error message
> > >
> > > An error has occurred during report processing. (rsProcessingAborted) Get
> > > Online Help
> > > Cannot create a connection to data source 'xxxx'. (rsErrorOpeningConnection)
> > > Get Online Help
> > > SQL Server does not exist or access denied.
> > >
> > >
> > > CAN SOMEONE PLEASE HELP ME!!!!!!|||There is no credential caching between data sources. Often this is some sort
of network name resolution issue.
--
Brian Welcker
Group Program Manager
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Leef" <Leef@.discussions.microsoft.com> wrote in message
news:D69B9ED5-00A6-4ECF-9501-C269709E90B8@.microsoft.com...
> I'm having a very similar problem, but I have two reports using the
> datascource and rendering no problem and a third that gets the
> rsErrorOpeningConnection error. This report previews just fine in VS, but
> when not when deployed to the server. Anyone know if RS is does some sort
> of
> credential caching?
> "PV" wrote:
>> I confirmed this... Found out that I could connect from the Reporting
>> services machine to my SQL Server using the same SQL credentials...
>> Also gave access to the DB to the user that the Report Manager runs
>> under...
>> But this still occurs.
>>
>> "Nikolai Sonin" wrote:
>> > I too had this problem. The way that I fixed it was by making sure
>> > that I
>> > could connect to the SQL server in question from the server that hosted
>> > the
>> > reporting services website. It was the that I realized two very
>> > important
>> > things.
>> > 1. The user profile that reporting services uses to run as a service
>> > needs
>> > SQL server access.
>> > 2. The user profile that I entered as the login for the report needed
>> > to be
>> > qualified with a domain name if it was a windows account.
>> > These may not be your problem, but they were mine. I hope this helps
>> >
>> >
>> > "PV" wrote:
>> >
>> > > Hi,
>> > > I am working with SQL Reporting services 2000... The report is
>> > > unable to
>> > > connect to a remote datasource as I try to preview it. The database
>> > > uses both
>> > > SQL and Windows Auth.
>> > >
>> > > 1. Created a shared datasource in my project
>> > > 2. Deployed it on the server. Used OverwriteDataSource = false
>> > > 3. Create a new shared datasource on the server. Gave a connection
>> > > string
>> > > with no username and password.
>> > > 4. Selected "Credentials stored securely in the report server" and
>> > > then
>> > > entered the SQL server login and passoword there.
>> > > 5. Changed the report properties in the manager to use this
>> > > datasource.
>> > > 6. While trying to "View" via report manager, I am getting the error
>> > > message
>> > >
>> > > An error has occurred during report processing. (rsProcessingAborted)
>> > > Get
>> > > Online Help
>> > > Cannot create a connection to data source 'xxxx'.
>> > > (rsErrorOpeningConnection)
>> > > Get Online Help
>> > > SQL Server does not exist or access denied.
>> > >
>> > >
>> > > CAN SOMEONE PLEASE HELP ME!!!!!!|||Thanks! I finally figure it out.
It was a permissions problem, but was masked because I thought it was using
the shared datasource. Instead it was using a report specific datasource that
had the same name. The way I discovered this was by going and taking a look
at the XML code of the problem report.
"Brian Welcker [MSFT]" wrote:
> There is no credential caching between data sources. Often this is some sort
> of network name resolution issue.
> --
> Brian Welcker
> Group Program Manager
> Microsoft SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Leef" <Leef@.discussions.microsoft.com> wrote in message
> news:D69B9ED5-00A6-4ECF-9501-C269709E90B8@.microsoft.com...
> > I'm having a very similar problem, but I have two reports using the
> > datascource and rendering no problem and a third that gets the
> > rsErrorOpeningConnection error. This report previews just fine in VS, but
> > when not when deployed to the server. Anyone know if RS is does some sort
> > of
> > credential caching?
> >
> > "PV" wrote:
> >
> >> I confirmed this... Found out that I could connect from the Reporting
> >> services machine to my SQL Server using the same SQL credentials...
> >>
> >> Also gave access to the DB to the user that the Report Manager runs
> >> under...
> >>
> >> But this still occurs.
> >>
> >>
> >>
> >> "Nikolai Sonin" wrote:
> >>
> >> > I too had this problem. The way that I fixed it was by making sure
> >> > that I
> >> > could connect to the SQL server in question from the server that hosted
> >> > the
> >> > reporting services website. It was the that I realized two very
> >> > important
> >> > things.
> >> > 1. The user profile that reporting services uses to run as a service
> >> > needs
> >> > SQL server access.
> >> > 2. The user profile that I entered as the login for the report needed
> >> > to be
> >> > qualified with a domain name if it was a windows account.
> >> > These may not be your problem, but they were mine. I hope this helps
> >> >
> >> >
> >> > "PV" wrote:
> >> >
> >> > > Hi,
> >> > > I am working with SQL Reporting services 2000... The report is
> >> > > unable to
> >> > > connect to a remote datasource as I try to preview it. The database
> >> > > uses both
> >> > > SQL and Windows Auth.
> >> > >
> >> > > 1. Created a shared datasource in my project
> >> > > 2. Deployed it on the server. Used OverwriteDataSource = false
> >> > > 3. Create a new shared datasource on the server. Gave a connection
> >> > > string
> >> > > with no username and password.
> >> > > 4. Selected "Credentials stored securely in the report server" and
> >> > > then
> >> > > entered the SQL server login and passoword there.
> >> > > 5. Changed the report properties in the manager to use this
> >> > > datasource.
> >> > > 6. While trying to "View" via report manager, I am getting the error
> >> > > message
> >> > >
> >> > > An error has occurred during report processing. (rsProcessingAborted)
> >> > > Get
> >> > > Online Help
> >> > > Cannot create a connection to data source 'xxxx'.
> >> > > (rsErrorOpeningConnection)
> >> > > Get Online Help
> >> > > SQL Server does not exist or access denied.
> >> > >
> >> > >
> >> > > CAN SOMEONE PLEASE HELP ME!!!!!!
>
>