Showing posts with label local. Show all posts
Showing posts with label local. Show all posts

Friday, March 30, 2012

problem with local connection

I've just installed VS .NET 2005 and also installed sql Express that come along with it
when I tried to run a simple web page wih gridview that connect to the sql express with the table that I create and test it
status is "Tested connection suceeded" or test query is also successful but when I run I got the following message please help

-----------------------

Cannot open database "customers" requested by the login. The login failed.
Login failed for user 'myServer\ASPNET'.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException: Cannot open database "customers" requested by the login. The login failed.
Login failed for user 'USFER54-8B481CE\ASPNET'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[SqlException (0x80131904): Cannot open database "customers" requested by the login. The login failed.Login failed for user 'USFER54-8B481CE\ASPNET'.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +739123 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1956 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +170 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +349 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83 System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70 System.Web.UI.WebControls.GridView.DataBind() +4 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82 System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69 System.Web.UI.Control.EnsureChildControls() +87 System.Web.UI.Control.PreRenderRecursiveInternal() +41 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360

Thanks in advance for your help

ASPNet ('USFER54-8B481CE\ASPNET') user is not having access to the database. You can add ASPNet user to this database using management studio and then try accessing the site.

You can also try accessing the site using SQL Server User instead of Windows User.

sql

Problem with linking tables

I have an Access database that contains local files and files linked on a SQL server through a DNS connection. I have been using this for years and during that time I have dropped links, added links, changed the DNS server information, etc.

I changed the DNS server information this weekend, deleted all the links, and was ready to start linking the tables with the new DNS information. I click on File >> Get External Data >> Link Tables and am given the traditional file selection dialogue. I go to the bottom (Files of Type) and scroll to the last selection... ODBC Databases().

In the past, after I made that selection, I would then be taken to the ODBC dialogue from my computer to select the connection type and then the actual connection.

Now however, the dialogue immediately stops. It doesn't lock, it just stops and returns me to the Database window from my database as though I wasn't doing anything.

I have reinstalled Office and redone all the updates. Does anyone have any suggestions?

Thanks,

Gary

I just had the same problem today, but after installing new version of Norton Antivirus.

I found the solution on forum from jan 2006 (I'm not that smart)...

Turning off the Office plug-in in Norton Antivirus did indeed work. For those who need specific directions:

1. In Norton Antivirus, select Options from the toolbar, choose Norton Antivirus.
2. On the left select the Miscellaneous option
3. Uncheck the box for the Office Plug-in (scanning MS Office documents)
4. If you had MS Access open during this process, shut it down and restart it.

Hope this helps!

Emilija

|||

Thanks so much, Emilija. You hit it right on the head. I wouldn't have thought of that in 1,000,000 years!

Now all we have to do is make it esaier to find and change things in Norton! Every new edition hides things even more.

Thanks again,

Gary

Wednesday, March 28, 2012

Problem with JOIN

I'm learning aspx. I have the following code in my aspx:
SqlConnection connection = new
SqlConnection("server=(local)\\NetSDK;database=pub s;Integrated
Security=SSPI");
String sqlCommand = "SELECT * FROM Titles INNER JOIN MyTable ON
MyTable.title_id=Titles.title_id";
SqlDataAdapter command = new SqlDataAdapter(sqlCommand, connection);
..
..
..
This code returns the correct data set. However, when I use this code:
SqlConnection connection = new
SqlConnection("server=(local)\\NetSDK;database=pub s;Integrated
Security=SSPI");
String sqlCommand = "SELECT Titles.title_id, title, type, pub_id, price,
notes, pubdate FROM Titles INNER JOIN MyTable ON
MyTable.title_id=Titles.title_id";
SqlDataAdapter command = new SqlDataAdapter(sqlCommand, connection);
..
..
..
the returned data set does not contain the MyTable data.
What is Wrong?
"RuffAroundTheEdges" schrieb:
> I'm learning aspx. I have the following code in my aspx:
> SqlConnection connection = new
> SqlConnection("server=(local)\\NetSDK;database=pub s;Integrated
> Security=SSPI");
> String sqlCommand = "SELECT * FROM Titles INNER JOIN MyTable ON
> MyTable.title_id=Titles.title_id";
> SqlDataAdapter command = new SqlDataAdapter(sqlCommand, connection);
> .
> This code returns the correct data set. However, when I use this code:
> SqlConnection connection = new
> SqlConnection("server=(local)\\NetSDK;database=pub s;Integrated
> Security=SSPI");
> String sqlCommand = "SELECT Titles.title_id, title, type, pub_id, price,
> notes, pubdate FROM Titles INNER JOIN MyTable ON
> MyTable.title_id=Titles.title_id";
> SqlDataAdapter command = new SqlDataAdapter(sqlCommand, connection);
> .
> the returned data set does not contain the MyTable data.
> What is Wrong?
You are not asking for data from MyTable. All the fields in the select list
are fields from 'titles', aren't they?
|||If you place the star (*) in the selection list without any prefix for any
table, even all joined tables are used for selecting the columns, If you are
specifying the columns only these are selected.
So in your second example you should go for that statement if you want to
get those columns in addition:

> String sqlCommand = "SELECT Titles.title_id, title, type, pub_id, price,
> notes, pubdate,
myTable.*
FROM Titles INNER JOIN MyTable ON
> MyTable.title_id=Titles.title_id";
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"RuffAroundTheEdges" <RuffAroundTheEdges@.discussions.microsoft.com> wrote in
message news:AC882F99-C17E-43BF-843E-0EF0D0B4ADC1@.microsoft.com...
> I'm learning aspx. I have the following code in my aspx:
> SqlConnection connection = new
> SqlConnection("server=(local)\\NetSDK;database=pub s;Integrated
> Security=SSPI");
> String sqlCommand = "SELECT * FROM Titles INNER JOIN MyTable ON
> MyTable.title_id=Titles.title_id";
> SqlDataAdapter command = new SqlDataAdapter(sqlCommand, connection);
> .
> .
> .
> This code returns the correct data set. However, when I use this code:
> SqlConnection connection = new
> SqlConnection("server=(local)\\NetSDK;database=pub s;Integrated
> Security=SSPI");
> String sqlCommand = "SELECT Titles.title_id, title, type, pub_id, price,
> notes, pubdate FROM Titles INNER JOIN MyTable ON
> MyTable.title_id=Titles.title_id";
> SqlDataAdapter command = new SqlDataAdapter(sqlCommand, connection);
> .
> .
> .
> the returned data set does not contain the MyTable data.
> What is Wrong?
|||The example shown in the FROM document page at;
http://msdn.microsoft.com/library/de..._pubs_2v8l.asp
has:
SELECT ProductID, Suppliers.SupplierID
FROM Suppliers JOIN Products
ON (Suppliers.SupplierID = Products.SupplierID)
|||I had to do more reading and found that the SELECT statement works
differently in a JOIN:
SELECT Titles.title.id, ..., MyTable.stuff FROM Titles JOIN MyTable ON
(MyTable.title_id = Titles.title_id)

Tuesday, March 20, 2012

Problem with full text searching

I'm wrtiting a local site search egine but I need to make use of functions like FREETEXTABLE
for instance. In order to use this I have to have the' Full Text Searchtable' enabled for a table. Now the Microsoft Search Service is runningin MSDE; of that I'm sure. However when I try to enable the full textsearching on a table or database the option that I'm supposed to chooseis grayed out which means I can't select it. What's wrong? What do Ihave to do to be able to use that option? I' short of time and wouldappreciate n answer a.s.a.p. Thanks
MSDE does not support the full text service, sorry :-(
|||I am using sql server 2000 trial edition and I'm sure I checked the full text search option during the installion.
|||Figured out the problem thanks!

Monday, February 20, 2012

Problem with dates format passed as parameters...

Hi,

I am having the "classical problem" of the forums; A local date changed to the american format (normally in the development environment) which I call "Switching months with days"... well it switches both again if you press "view report" again :)

The problem I'm having is that when I Navigate from one report to other, the dates get switched...
Everything's been set in the locale uk date format (dd/mm/aaaa), in the operating system, in the database and in the reports... and the reports are working properly through the web interface.. the only thing that is not working properly is the Navigation which switches the date month with the day...

Changing all the Reporting Services server, database server to the american format date is not an acceptable solution.

Thanks for any guidance on this, as I'm pretty lost...
Jose

where are you switching the dates.

may be create and set a workflag and set it to 0 or 1

based if its 1 dont do anything if its 0 switch the dates to american format. so even if the user clicks the view report again, it will check for 1 and does nothing.

Thanks

Kishore.

|||Hi Raja,

Thanks for your help, I'll try to explain what you ask:
I have a report with two parameters :
BeginningDate|||Try using string instead of datetime parameter, formatted as yyyyMMdd.

This is something like Convert(varchar(8),mydate,112)

Here is a good link with examples in SQL.
http://databases.aspfaq.com/database/what-are-the-valid-styles-for-converting-datetime-to-string.html

In Reporting Services you would use the Format function. eg. Format(MyDate, "yyyyMMdd")

cheers,
Andrew|||Hi!

That would work if the report wasn't called directly from the user, then, with that approach we are unable to present him the data selector, so he will have to write down the date this way... that is not acceptable by my client...

If the report was accessible only through the Navigation Link your approach would work wonderfully...

The point is how to make dates work right in other languages in SQL Server 2005 Reporting Services.... we are at the 2nd Service pack and it still doesn't work properly.. sigh...

Have to say that I have tried everything here, changing the user that executes the reporting services service, the database language, the system locale, the web.config locale, the report, table and all is set to spain (spain) and still it twists the date when we pass it as a paremeter

"13/02/2006" to "02/13/2006" , giving the properly errors, though...

Well, any help on this?
Thanks!!!
Jose