Showing posts with label couple. Show all posts
Showing posts with label couple. Show all posts

Monday, March 19, 2012

Help needed with an error message

I have been putzing with this error message for a couple of hours now, and I cannot seem to get it to go away. Any ideas on how to fix it? I have verified that the user name, password, and server location is all correct.

System.Data.SqlClient.SqlException: Login failed for user 'xxxxxx'. Reason: Not associated with a trusted SQL Server connection. at System.Data.ProviderBase.DbConnectionPool.GetConnection(Object owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnectionBase owningConnection) at System.Data.ProviderBase.DbConnectionClosed.Open(DbConnectionBase outerConnection) at System.Data.ProviderBase.DbConnectionBase.Open() at System.Data.SqlClient.SqlConnection.Open() at xxxxx.selection.FillDGResults() in c:\inetpub\wwwroot\xxxxx\xxxxx.aspx.vb:line 74

Thanks!

Dancan you post your connection string ? check if the user name exists in the users tab of the database.

hth|||Here is my connection string. Naturally, the ID, Password, and location have all been altered for security reasons.

<code.<appSettings>
<add key="cnSystem" value="packet size=4096;user id=userID; data source=SQLSERV;="None";persist security info=True;initial catalog=System;password=hellothere" />
</appSettings> </code>|||Scratch that last post... I posted a messed up version. It should read

<code. <appSettings>
<add key="cnSystem" value="packet size=4096;user id=userID; data source=SQLSERV;persist security info=True;initial catalog=System;password=hellothere" />
</appSettings> </code>|||Is the SQL Server set to allow both trusted logins and sql server logins? The error message suggests that it is expecting a trusted connection (trusting the domain authentication) yet your connection string contains a user name and password.

Friday, March 9, 2012

Help needed for Sql2005 Transaction Logs

Hi,

I have run a lot of insert/ delete, update queries on a database in sql 2005 for a couple of months

Is there a way to track when and what are sql transactions that are have been executed?

Thanks in advance for your time and help.

whitze

You can monitor the activity in your database by running sql profiler........but this can be performed when you want to identify the bottlenecks in your db or in your server.........but it is not advisable to run it always....if you have the trace which is captured when those DML's were performed you can track it .......else i dont think its possible..........im not too sure about it......|||

If you have a complete trail of the Transaction Logs, you could use one of the several third party log tools to accomplish your task.

If you do not have a complete trail of Transaction Logs, then most likely, you will not be able get that information.

Wednesday, March 7, 2012

HELP MS Access moving to SQL and dont know how

I have been using MS Access for a long time. The last couple of months my sites have really picked up in business (good rankings) and we keep crashing the server (No sites on the server that use MS Access will run) We get the error

System.Data.OleDb.OleDbException: Unspecified error at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) at System.Data.OleDb.OleDbConnection.InitializeProvider()
at System.Data.OleDb.OleDbConnection.Open()
at DreamweaverCtrls.DataSet.DoInit()

Also I am finding out from some of my customers that their sites they can't use at times because of the error but the server hasn't crashed yet because others are up. Well I believe we are exceeding MS Access very badly because it crashes the server daily now and sometimes more then once a day.

So I am going to start moving my MS Access database to SQL but have NO CLUE how where to start etc or use SQL correctly. If people can point me in the right direction that would be very helpful. Everything I find online is people needing help but no solutions that work for me.

My new server is a windows server running ASP.Net 2.0 and to edit my SQL I have "ASP.Net Enterprise Manager" and Plesk for the server.

1. A good book to follow and easy to follow for SQL (connections / how tos) or website

2. Good examples or book on "ASP.Net Enterprise Manager"

3. How to convert access databases into SQL easy (some have over 50,000 listings)

4. how to convert Tab files into SQL easy.

Thank you so much for any help. Also I am using Dreamweaver for most of the edditing and connections. I know its not your favorite but I don't have the time to write everything by hand and it works good for what I do on the websites.

Thanks again,

Rusty

Rusty,

To easily convert your Access tables to SQL Express, set up an ODBC System DSN for the SQL Server. Then when in Access, right click on the tables, one at a time, and choose export. From there choose the ODBC option and select the system DSN you just set up. Your tables should transfer automatically.

Of course I am assuming you have SQL Express setup already.

|||

I have it setup but I can't get it connected by dreamweaver. I get the error

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied."

I haven't found anything on exactly how to get it connected yet and still doing the trial and error thing.. LOL Now my access 2003 works perfect my server on the server online but no luck with SQL yet

Help me: error on Home Page for some.

Hi there,

I'm new here and fairly new to .NET and C# too.

I've received a couple of complains about a website I've been working on thepast year or so: http://www.ipcamerademos.com/

I can open and browse the website fine, in both MS Internet Explorer andFirefox. But some people are getting some error opening up the website (homepage):

Server Error in '/' Application.


String or binary data would be truncated.
The statement has been terminated.

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: String or binary data would be truncated.
The statement has been terminated.

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): String or binary data would be truncated.

The statement has been terminated.]

System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857178

System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734790

System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188

System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838

System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) +192

System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +380

System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135

ipcamerademos.index.Counter() +359

ipcamerademos.index.Page_Load(Object sender, EventArgs e) +86

System.Web.UI.Control.OnLoad(EventArgs e) +99

System.Web.UI.Control.LoadRecursive() +47

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

Anyone here gets this error and knows what would cause it? Any hints orideas - have someone experienced something similar?

Thank you all in advance,

Marcio W. Dirickson.

The website opens fine with firefox and opera but crashes everytime with ie7 on vista. What are you storing in a database or getting from a database when you load the web page?|||

Hi Ken,

Most of the home page content is from the database (the main article and all the other articles). And we store a "counter" type information from the home page as well. From what I got replies (from users and visitors) with Windows XP and IE6 also had cases of this error...

Thanks for the reply...

|||

Is your data access code in a try catch block?

|||

I was able to open the website in firefox. When I viewed the source I found this. When you fix the loading xml error I think you will solve your problem.

<td valign="top"
<!-- Right -->
<table width="223"border="0"cellspacing="0"cellpadding="0">
<!--tr>
<td>< Shop >
Loading XML: failed. Error 404x.
</td>
</tr>
<tr>
<td height="5"></td>
</tr-->
<tr>
<td>
<!-- E-newsletter -->
<table width="223"border="0"cellspacing="0"cellpadding="0">
<tr>
<td
<table width="223"border="0"cellspacing="0"cellpadding="0"bordercolor="#374B8D"bgcolor="#4761B7"style="border: 5px solid #374B8D;">
<tr>
<td><img src="/images/td_top_blue.gif"width="213"height="12"alt=""border="0"></td>
</tr>
<tr>
<td class="subtitle_blue">E-NEWSLETTERS</td>
</tr>
|||

Hi again Ken,

I've checked the XLS and wasn't that... so I added some more catch blocks and found where the error was happening: where we grabbed and stored the logs information.

public void Counter()
{
try
{
// Insert Access Log
string IP = Request.ServerVariables["REMOTE_ADDR"];
string browser = Request.ServerVariables["HTTP_USER_AGENT"];
string source = Request.ServerVariables["HTTP_REFERER"];
conn.executeSQL("INSERT INTO tbl_ipc_logs (ipl_IP, ipl_browser, ipl_source, ipl_date) VALUES ('" + IP + "', '" + browser + "', '" + source + "', '" + DateTime.Now + "')");
conn.objConnection.Close();
conn.objConnection.Dispose();
}
catch(Exception)
{
// Response.Write("Access Logs : " + e);
// Response.Flush();
}
}

With the catch the page started working.

Thank you for the help!