Showing posts with label connection. Show all posts
Showing posts with label connection. Show all posts

Wednesday, March 21, 2012

Invalid Object Issue...

I ran the Upsizing wizard to convert an Access file to a SQL file.
Everything worked fine before. I changed my connection string and now I
get:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E37) [Microsoft][ODBC SQL
Server Driver][SQL Server]Invalid object name 'tbl_MRSongs'.
/impulse/impulse_MR.asp, line 77
For the record, the connection works fine in Live Data in DW.
Here's the offending code:
<%
var rs_MRSong = Server.CreateObject("ADODB.Recordset");
rs_MRSong.ActiveConnection = MM_con_MR_STRING;
rs_MRSong.Source = "SELECT * FROM tbl_MRSongs WHERE ID_Song = "+
rs_MRSong__MMColParam.replace(/'/g, "''") + "";
rs_MRSong.CursorType = 0;
rs_MRSong.CursorLocation = 2;
rs_MRSong.LockType = 1;
rs_MRSong.Open(); <-- This is line 77
var rs_MRSong_numRows = 0;
%>
Here's the connection string:
var MM_con_MR_STRING = "Provider=MSDASQL;Driver={SQL
Server};Server=(local);Database =
DataBASE;UID=USER;PWD=PASSWORD;Trusted_Connection= yes"
What changes did u make to the connection string? Also, you might want to
first test this new connection string and if it works by using a UDL file.
Cheers,
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Invalid Object Issue...

I ran the Upsizing wizard to convert an Access file to a SQL file.
Everything worked fine before. I changed my connection string and now I
get:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E37) [Microsoft][
ODBC SQL
Server Driver][SQL Server]Invalid object name 'tbl_MRSongs'.
/impulse/impulse_MR.asp, line 77
For the record, the connection works fine in Live Data in DW.
Here's the offending code:
<%
var rs_MRSong = Server.CreateObject("ADODB.Recordset");
rs_MRSong.ActiveConnection = MM_con_MR_STRING;
rs_MRSong.Source = "SELECT * FROM tbl_MRSongs WHERE ID_Song = "+
rs_MRSong__MMColParam.replace(/'/g, "''") + "";
rs_MRSong.CursorType = 0;
rs_MRSong.CursorLocation = 2;
rs_MRSong.LockType = 1;
rs_MRSong.Open(); <-- This is line 77
var rs_MRSong_numRows = 0;
%>
Here's the connection string:
var MM_con_MR_STRING = "Provider=MSDASQL;Driver={SQL
Server};Server=(local);Database =
DataBASE;UID=USER;PWD=PASSWORD;Trusted_C
onnection=yes"What changes did u make to the connection string? Also, you might want to
first test this new connection string and if it works by using a UDL file.
Cheers,
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

invalid login packet

Hello,
I get the following message every once in a while.
Connection opened but invalid login packet(s) sent. Connection closed..
Error: 17832, Severity: 20, State: 10
This is a SBS 2000 with SQL 2000. I do not have a clue on what is
generating this message. I have not found any information about the State:
10. Any help would be helpful.
Thank You,
Joe Bucar
Hi Joe,
Basically, this means that a session was setup to the Server, but the
login packet was either not sent, or incomplete. I would check the version
of MDAC on the machine and verify that you have the security update
installed.
http://www.microsoft.com/technet/sec.../MS04-003.mspx
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
|||Hello Kevin,
Thank you for your response. I will verify that the update is applied and
see if the message shows up again.
Regards,
Joe Bucar
"Kevin McDonnell [MSFT]" <kevmc@.online.microsoft.com> wrote in message
news:tmHy086NEHA.3964@.cpmsftngxa10.phx.gbl...
> Hi Joe,
> Basically, this means that a session was setup to the Server, but the
> login packet was either not sent, or incomplete. I would check the
version
> of MDAC on the machine and verify that you have the security update
> installed.
> http://www.microsoft.com/technet/sec.../MS04-003.mspx
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>

invalid login packet

Hello,
I get the following message every once in a while.
Connection opened but invalid login packet(s) sent. Connection closed..
Error: 17832, Severity: 20, State: 10
This is a SBS 2000 with SQL 2000. I do not have a clue on what is
generating this message. I have not found any information about the State:
10. Any help would be helpful.
Thank You,
Joe BucarHi Joe,
Basically, this means that a session was setup to the Server, but the
login packet was either not sent, or incomplete. I would check the version
of MDAC on the machine and verify that you have the security update
installed.
http://www.microsoft.com/technet/se...n/MS04-003.mspx
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Hello Kevin,
Thank you for your response. I will verify that the update is applied and
see if the message shows up again.
Regards,
Joe Bucar
"Kevin McDonnell [MSFT]" <kevmc@.online.microsoft.com> wrote in message
news:tmHy086NEHA.3964@.cpmsftngxa10.phx.gbl...
> Hi Joe,
> Basically, this means that a session was setup to the Server, but the
> login packet was either not sent, or incomplete. I would check the
version
> of MDAC on the machine and verify that you have the security update
> installed.
> http://www.microsoft.com/technet/se...n/MS04-003.mspx
> Thanks,
> Kevin McDonnell
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
>

Invalid Log Scan

I do not understand it but by connection to my database seems to keep crapping out. I get the below error and my app appears to be unable to access the connection. Then a couple restarts later it tells me that my login under my Windows User failed . The database is there and besides maybe a couple records longer there isnt anything corrupt about the data, and in fact, if I restart the entire PC most times it will allow me to connect again. I can even still access the data tables through the C# editor. Any idea why this error is being thrown?

Thx

Code Snippet

System.Data.SqlClient.SqlException was unhandled
Message="A system assertion check has failed. Check the SQL Server error log for details\r\nThe log scan number (35:460:2) passed to log scan in database 'F:\\PDLOGSHEET\\PDLOGSHEET\\BIN\\DEBUG\\DATABASE1.MDF' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup. \r\nAn error occurred during recovery, preventing the database 'F:\\PDLOGSHEET\\PDLOGSHEET\\BIN\\DEBUG\\DATABASE1.MDF' (database ID 26) from restarting. Diagnose the recovery errors and fix them, or restore from a known good backup. If errors are not corrected or expected, contact Technical Support.\r\nCannot open user default database. Login failed.\r\nLogin failed for user 'GC\\cbcottier'.\r\nLocation:\t logscan.cpp:1925\nExpression:\t UtilDbccIsInsideDbcc ()\nSPID:\t\t 51\nProcess ID:\t 3640\r\nLocation:\t logscan.cpp:1925\nExpression:\t UtilDbccIsInsideDbcc ()\nSPID:\t\t 51\nProcess ID:\t 3640"
Source=".Net SqlClient Data Provider"
ErrorCode=-2146232060
Class=20
LineNumber=65536
Number=3624
Procedure=""
Server="\\\\.\\pipe\\E74940B1-0BD7-42\\tsql\\query"
State=1
StackTrace:
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at PDLogSheet.Database1DataSetTableAdapters.ReportTitlesTableAdapter.Fill(ReportTitlesDataTable dataTable) in F:\PDLogSheet\PDLogSheet\Database1DataSet.Designer.cs:line 4362
at PDLogSheet.frmLogSheet.frmLogSheet_Load(Object sender, EventArgs e) in F:\PDLogSheet\PDLogSheet\frmLogSheet.cs:line 42
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at PDLogSheet.Program.Main() in F:\PDLogSheet\PDLogSheet\Program.cs:line 17
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

This error indicates you have some corruption in your database.

You can run the dbcc checkdb command to verify this.

|||

1) how/where would I run the command

2)That would be the case even though it functions for a time after the PC is restarted and I can still access the data tables in C# immediately following getting the error?

|||*bump*|||

Yes. You can have a single corrupted page in a table for example and the table will work fine until you hit the bad page.

So run dbcc checkdb and dbcc checktable to find + fix corruption.

Invalid Instance Invalid Connection NT 4.0

When connecting to SQL Server using a Win NT 4.0 client I receive the messag
e:
[DBNETLIB] ConnectionOpen [Invalid Instance ()]Invalid Connection
Another Win NT 4.0 client works fine.
SQL MSDE 2000 release A installed on the server. Another SQL 2000 instance
is running (from another vendor) on the same machine. MDAC 2.7 sp1 refresh
checks out fine in component checker.
Any idea?By default MSDE 2000 SP3 only allows local connections, you have to go in
and enable MSDE to listen on TCP or Named Pipes if you wnat to allow remote
connectivity.
Cindy Gross, MCDBA, MCSE
http://cindygross.tripod.com
This posting is provided "AS IS" with no warranties, and confers no rights.

Monday, March 12, 2012

Invalid Connection to SQL2000 after installing SP3

After having installed SP3 on SQL 2000 server standard edition running
on Windows 2000 server, users cannot access the database whether
through Enterprise Manager, Query Analyser, or my application.
It was running fine before. Users are running Windows XP. The database
is a named instance and is used for replication. Funny enough, I may
access the database from my development machine which is running
Windows 2000 server.
Help is most welcome
PatrickPatrick,
What are the symptoms? What does "users cannot access the database"
mean? Does it time-out, do they get an error? Please paste the error
message.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Patrick wrote:
> After having installed SP3 on SQL 2000 server standard edition running
> on Windows 2000 server, users cannot access the database whether
> through Enterprise Manager, Query Analyser, or my application.
> It was running fine before. Users are running Windows XP. The database
> is a named instance and is used for replication. Funny enough, I may
> access the database from my development machine which is running
> Windows 2000 server.
> Help is most welcome
> Patrick|||Mark,
Thank you for your interest in our problem. The error message is just
"Invalid Connection". The server is running SQL server 2000 with sp3 n
Windows server 2000.
the client are running Windows XP pro.
Best Regards
Patrick
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!|||Patrick,
Connect from Query Analyzer and paste the message here, you will get
something more than "Invalid Connection".
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Patrick Menage wrote:
> Mark,
> Thank you for your interest in our problem. The error message is just
> "Invalid Connection". The server is running SQL server 2000 with sp3 n
> Windows server 2000.
> the client are running Windows XP pro.
> Best Regards
> Patrick
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!|||> Thank you for your interest in our problem. The error message is just
> "Invalid Connection".
? What software is giving this "error message"?
http://www.aspfaq.com/
(Reverse address to reply.)|||I have just found the solution. There was another SQL server instance
running with the same port number. I changed it and everythings is
working fine.
Thank you for your support.
Best Regards
Patrick
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!

Invalid Connection to SQL2000 after installing SP3

After having installed SP3 on SQL 2000 server standard edition running
on Windows 2000 server, users cannot access the database whether
through Enterprise Manager, Query Analyser, or my application.
It was running fine before. Users are running Windows XP. The database
is a named instance and is used for replication. Funny enough, I may
access the database from my development machine which is running
Windows 2000 server.
Help is most welcome
PatrickPatrick,
What are the symptoms? What does "users cannot access the database"
mean? Does it time-out, do they get an error? Please paste the error
message.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Patrick wrote:
> After having installed SP3 on SQL 2000 server standard edition running
> on Windows 2000 server, users cannot access the database whether
> through Enterprise Manager, Query Analyser, or my application.
> It was running fine before. Users are running Windows XP. The database
> is a named instance and is used for replication. Funny enough, I may
> access the database from my development machine which is running
> Windows 2000 server.
> Help is most welcome
> Patrick

Invalid Connection to SQL2000 after installing SP3

After having installed SP3 on SQL 2000 server standard edition running
on Windows 2000 server, users cannot access the database whether
through Enterprise Manager, Query Analyser, or my application.
It was running fine before. Users are running Windows XP. The database
is a named instance and is used for replication. Funny enough, I may
access the database from my development machine which is running
Windows 2000 server.
Help is most welcome
Patrick
Patrick,
What are the symptoms? What does "users cannot access the database"
mean? Does it time-out, do they get an error? Please paste the error
message.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Patrick wrote:
> After having installed SP3 on SQL 2000 server standard edition running
> on Windows 2000 server, users cannot access the database whether
> through Enterprise Manager, Query Analyser, or my application.
> It was running fine before. Users are running Windows XP. The database
> is a named instance and is used for replication. Funny enough, I may
> access the database from my development machine which is running
> Windows 2000 server.
> Help is most welcome
> Patrick
|||Mark,
Thank you for your interest in our problem. The error message is just
"Invalid Connection". The server is running SQL server 2000 with sp3 n
Windows server 2000.
the client are running windows XP pro.
Best Regards
Patrick
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||Patrick,
Connect from Query Analyzer and paste the message here, you will get
something more than "Invalid Connection".
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Patrick Menage wrote:
> Mark,
> Thank you for your interest in our problem. The error message is just
> "Invalid Connection". The server is running SQL server 2000 with sp3 n
> Windows server 2000.
> the client are running windows XP pro.
> Best Regards
> Patrick
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
|||> Thank you for your interest in our problem. The error message is just
> "Invalid Connection".
? What software is giving this "error message"?
http://www.aspfaq.com/
(Reverse address to reply.)
|||I have just found the solution. There was another SQL server instance
running with the same port number. I changed it and everythings is
working fine.
Thank you for your support.
Best Regards
Patrick
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!

Invalid connection string on SQLXMLBulkLoad

Hi.

I'm using SQLXMLBulkLoad to insert data into the SQL database. It worked with the test database on my PC but when I changed it into a VPS it throws an error: Invalid Connection String. This connection string that I used worked in my program before the addition of 'provider = sqloledb'.

Here's the connection string:

@."Provider = sqloledb; Data Source=CRM;Initial Catalog=Works;Persist Security Info=True;User ID=userid;Password=password;Asynchronous Processing=True";

Anyone?

heres the error code:
-2147217887If anyone is experiencing the same problem, I just edited my connection string manually to the VPS and it worked.

Invalid connection string on SQLXMLBulkLoad

Hi.

I'm using SQLXMLBulkLoad to insert data into the SQL database. It worked with the test database on my PC but when I changed it into a VPS it throws an error: Invalid Connection String. This connection string that I used worked in my program before the addition of 'provider = sqloledb'.

Here's the connection string:

@."Provider = sqloledb; Data Source=CRM;Initial Catalog=Works;Persist Security Info=True;User ID=userid;Password=password;Asynchronous Processing=True";

Anyone?

heres the error code:
-2147217887
If anyone is experiencing the same problem, I just edited my connection string manually to the VPS and it worked.

Invalid connection string attribute

We have a development team that is having intermittant problems with
connecting to a server. They are receiving the following error:
Microsoft OLE DB Provider for SQL Server ... Error Message: Invalid
connection string attribute
for the following connection string:
Provider=SQLOLEDB;Data Source=SNLSQLDBD01;Initial
Catalog=WINTER;Trusted_Connection=Yes;DateFormat=m dy
I'd appreciate any insight - as I said the error is intermittant (love
those). I can't find any examples of DateFormat being used in a SQLOLEDB
provider so I am wondering about that.
thanks
Peter
We now think that the message was misleading - there may be something in the
conection string that it didn't like (DateFormat=mdy ?) but was able to
cope with. The job ran fine when scheduled to start at a different time when
there was lower activity.
"Peter Feakins" wrote:

> We have a development team that is having intermittant problems with
> connecting to a server. They are receiving the following error:
> Microsoft OLE DB Provider for SQL Server ... Error Message: Invalid
> connection string attribute
> for the following connection string:
> Provider=SQLOLEDB;Data Source=SNLSQLDBD01;Initial
> Catalog=WINTER;Trusted_Connection=Yes;DateFormat=m dy
> I'd appreciate any insight - as I said the error is intermittant (love
> those). I can't find any examples of DateFormat being used in a SQLOLEDB
> provider so I am wondering about that.
> thanks
> Peter
>
>
>
>
|||I couldn't find any reference in the docs on the provider
for the attribute DateFormat. I found some posts were a few
others were using it but they had the value in double quotes
and used formats such as "YYYY-MM-DD". DateFormat = mdy
looks more like a T-SQL thing. You may want to just execute
a set dateformat SQL statement if that's what you want to
set the format for the client entering datetime data.
-Sue
On Thu, 9 Sep 2004 14:59:13 -0700, "Peter Feakins"
<PeterFeakins@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>We now think that the message was misleading - there may be something in the
>conection string that it didn't like (DateFormat=mdy ?) but was able to
>cope with. The job ran fine when scheduled to start at a different time when
>there was lower activity.
>"Peter Feakins" wrote:

Invalid Connection message

I have a database running under MSDE 2000 to which I can connect either
through MS Access or Coldfusion. However, I wanted to run a script at the
command prompt to try and have an automatic backup.
I typed OSQL -Usa -P at the command prompt and supplied a valid password but
after a few moments I got back:
[Shared Memory] Invalid connection.
[Shared Memory]ConnectionOpen (Invalid Instance()).
Can anyone point me in the right direction as to what might be wrong?
many thanks
june
hi June,
June Macleod wrote:
> I have a database running under MSDE 2000 to which I can connect
> either through MS Access or Coldfusion. However, I wanted to run a
> script at the command prompt to try and have an automatic backup.
> I typed OSQL -Usa -P at the command prompt and supplied a valid
> password but after a few moments I got back:
> [Shared Memory] Invalid connection.
> [Shared Memory]ConnectionOpen (Invalid Instance()).
>
did you provide the correct instance name in the form
osql -S(local)\InstanceName
?
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.15.0 - DbaMgr ver 0.60.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Thank you, that was the problem. I will now attempt to run my script.
June
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
news:3p0ba1F82e2mU1@.individual.net...
> hi June,
> June Macleod wrote:
> did you provide the correct instance name in the form
> osql -S(local)\InstanceName
> ?
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.15.0 - DbaMgr ver 0.60.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>

Invalid Connection

Hey everyone, hope you all can help me with this problem.

We have a remotely hosted website, but we have a SQL server in our company (powers our instore portal). I have set up our router so that i can connect to remote desktop and sql server. I can connect to the remote desktop and i can connect to the sql server with query analyzer. On our local site i can set up a connection to look at sqlserver.underpargolfutah.org and it works fine, everything goes well.

Now here is the problem. On the hosted site i have set up the following

web.config >

<appSettings>

<addkey="sql_dsn"value="server=************.underpargolfutah.org;database=online;uid=sa;pwd=*******"/>

</appSettings>

default.aspx >

PublicClass shopDB
'publicly declare typical stuff for connections
Public connAs SqlConnection
Public cmdAs SqlCommand
Public readerAs SqlDataReader
Public dsnAsString = ConfigurationSettings.AppSettings("sql_dsn").ToString
PublicFunction getBaseSelectionsByType(ByVal type)
'declare the connection
conn =New SqlConnection(dsn)
'declare command
cmd =New SqlCommand("SELECT * FROM category", conn)
'open the connection
conn.Open()
'grab data
reader = cmd.ExecuteReader(CommandBehavior.CloseConnection)
Return reader
EndFunction

EndClass

This should all work but i get the following error

[SqlException: Invalid connection.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
v3.shopDB.shopDB.getBaseSelectionsByType(Object type) in shopDB.vb:21
v3.shop_default.Page_Load(Object sender, EventArgs e) in default.aspx.vb:32
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +742

Any ideas? i am stumped.

Thanks in advance
-Darren

Hi Darren!

But it is not tradition way. I think, when you are going to make access to your mashine database from web hosting, then you need to grant the permission for dbaccess aspnet accout from web hosting. Do you know name of webhosting aspnet user? If it is. then do next:

osql -E -S (local)\YourSQLserverName -d yourdatabasename -Q "sp_grantdbaccess'your_aspnet_webhostingaccount'"
osql -E -S (local)\YourSQLserverName -dyourdatabasename-Q "sp_addrolemember 'db_owner','your_aspnet_webhostingaccount'"

Sincerely, LukCAD

Friday, March 9, 2012

invalid authorization specification error? Frontpage DB wizard

I have searched high and low to find out what this means... and I can't. My
connection to the SQL server from Frontpage 2003 database wizard worked then
suddenly didn't. What did I inadvertently change... if anything... Sounds
like an SQL isn't letting me retrieve..but I have no idea why...
Help"Cheryl" <Cheryl@.discussions.microsoft.com> wrote in message
news:71C7C35F-BA9F-4F25-81D5-8BB3E6005A63@.microsoft.com...
>I have searched high and low to find out what this means... and I can't. My
> connection to the SQL server from Frontpage 2003 database wizard worked
> then
> suddenly didn't. What did I inadvertently change... if anything... Sounds
> like an SQL isn't letting me retrieve..but I have no idea why...
> Help
What error message is being reported back by Frontpage?
Is the SQL Server running?
Did you install any service packs, upgrades, other software?
Rick Sawtell
MCT, MCSD, MCDBA|||That was what the browser was reporting: invalid authorization specification
in the database results wizard... Yet, when I coded my own connection instead
of using the wizard on a page.. It worked fine...
When I changed the authentication method on the server to send in clear text
as per:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q247931&ID=kb;en-us;Q247931
It seemed to start to work again... Yet I recalled re-setting nothing of the
sort...
I was lead here by changing trusted_connection to yes and following the
message from there...
"Rick Sawtell" wrote:
> "Cheryl" <Cheryl@.discussions.microsoft.com> wrote in message
> news:71C7C35F-BA9F-4F25-81D5-8BB3E6005A63@.microsoft.com...
> >I have searched high and low to find out what this means... and I can't. My
> > connection to the SQL server from Frontpage 2003 database wizard worked
> > then
> > suddenly didn't. What did I inadvertently change... if anything... Sounds
> > like an SQL isn't letting me retrieve..but I have no idea why...
> >
> > Help
>
> What error message is being reported back by Frontpage?
> Is the SQL Server running?
> Did you install any service packs, upgrades, other software?
>
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>|||Hmmm..
Glad you got it working again.
I wonder if you have automatic updates turned on and it installed a service
pack for IIS or IE that may have reset that value...
Rick
"Cheryl" <Cheryl@.discussions.microsoft.com> wrote in message
news:FFA1F56D-C150-4665-AB3F-D4FDEC749002@.microsoft.com...
> That was what the browser was reporting: invalid authorization
> specification
> in the database results wizard... Yet, when I coded my own connection
> instead
> of using the wizard on a page.. It worked fine...
> When I changed the authentication method on the server to send in clear
> text
> as per:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;Q247931&ID=kb;en-us;Q247931
> It seemed to start to work again... Yet I recalled re-setting nothing of
> the
> sort...
> I was lead here by changing trusted_connection to yes and following the
> message from there...
> "Rick Sawtell" wrote:
>> "Cheryl" <Cheryl@.discussions.microsoft.com> wrote in message
>> news:71C7C35F-BA9F-4F25-81D5-8BB3E6005A63@.microsoft.com...
>> >I have searched high and low to find out what this means... and I can't.
>> >My
>> > connection to the SQL server from Frontpage 2003 database wizard worked
>> > then
>> > suddenly didn't. What did I inadvertently change... if anything...
>> > Sounds
>> > like an SQL isn't letting me retrieve..but I have no idea why...
>> >
>> > Help
>>
>> What error message is being reported back by Frontpage?
>> Is the SQL Server running?
>> Did you install any service packs, upgrades, other software?
>>
>> Rick Sawtell
>> MCT, MCSD, MCDBA
>>

Friday, February 24, 2012

Intranet Set up with SQL server and ASP

Dear all,

I am trying to make a Intranet connection with SQL 2000 and ASP,
but a serious problem in connection string. Please can you help me in this issue

I am using following connection string.

(windows authontication)

Set conn=Server.CreateObject("ADODB.Connection")

conn.Mode=adModeReadWrite
conn.Open="PROVIDER=SQLOLEDB;Integrated Security=SSPI;Initial cataloge =nrth;DataSource=server"

System dsn =nrth
server name =server

This string makes following error

Microsoft OLE DB Provider for SQL Server error '80040e4d'

Invalid connection string attribute

//global.asa, line 17

Microsoft OLE DB Provider for SQL Server error '80040e4d'

Invalid connection string attribute

/test2.asp, line

can you correct this or suggest a valid connection string

Thank youThe DSN probably only exists on the one server. Try replacing it with
Server=servername.|||Originally posted by Satya
The DSN probably only exists on the one server. Try replacing it with
Server=servername.

still having error,

I am checking it in server itself

interupt JDBC SQL query connection

Hi

I using Java and JDBC to connect to MS SQL server 2000 (using the MS
drivers msbase,msutil and mssqlserver.jars).

Sometimes it takes a long time for statement.executeQuery
to return and start returning the resultset
(full DB scan can take 30-40 minutes).

Does anyone know if it's possible to interupt/halt the query before
it eventually comes back. The setQueryTimeout works OK but this has to be
set quite high to allow real queries to run correctly. What I'm trying
to do is allow users to halt their query if they've realised they
want to alter it or its taking too long. The query is running in a
separate thread and I've tried using the main thread to close the
connection or stop the query but this still waits until the resultset
is returned.

Maybe it's a driver issue or ....

Thanks
MikeHi

I am not sure about the JDBC driver itself, but you could use a timer thread
to kill it off.

John

"Mike Read" <mar@.roe.ac.uk> wrote in message
news:Pine.OSF.4.58.0406091501320.263861@.reaxp06.ro e.ac.uk...
> Hi
> I using Java and JDBC to connect to MS SQL server 2000 (using the MS
> drivers msbase,msutil and mssqlserver.jars).
> Sometimes it takes a long time for statement.executeQuery
> to return and start returning the resultset
> (full DB scan can take 30-40 minutes).
> Does anyone know if it's possible to interupt/halt the query before
> it eventually comes back. The setQueryTimeout works OK but this has to be
> set quite high to allow real queries to run correctly. What I'm trying
> to do is allow users to halt their query if they've realised they
> want to alter it or its taking too long. The query is running in a
> separate thread and I've tried using the main thread to close the
> connection or stop the query but this still waits until the resultset
> is returned.
> Maybe it's a driver issue or ....
> Thanks
> Mike|||how many people here get the luxery of creating and maintaining apps in
jbuilder and together everyday? care to share any stories, either great
or not so great! i just got an eval of the latest and greatest installed
and after using previous versions for years, what i see now looks really
great. just was wondering about your experiences.

cheers

- perry|||I'm just new in the Java World and also JBuilder X Enterprise IDE. I'm
making a servlet client , using Struts , because the MVC pattern is just what
we need for our application.
Until now this is working just fine. I like the IDE, autocompletion, colors,
indent, etc.
The progam gives a lots of tips and help using class, packages, etc.

Greetings....

In comp.lang.java perry <perry@.cplusplus.org> wrote:
: how many people here get the luxery of creating and maintaining apps in
: jbuilder and together everyday? care to share any stories, either great
: or not so great! i just got an eval of the latest and greatest installed
: and after using previous versions for years, what i see now looks really
: great. just was wondering about your experiences.

: cheers

: - perry

--
Alfredo Diaz
================
School of Engineering and Science, University of Chile
Beaucheff 850, P.O. Box 2777, Santiago, CHILE
mailto:aadiaz@.dcc.uchile.cl.nospam|||Mike Read (mar@.roe.ac.uk) writes:
> I using Java and JDBC to connect to MS SQL server 2000 (using the MS
> drivers msbase,msutil and mssqlserver.jars).
> Sometimes it takes a long time for statement.executeQuery
> to return and start returning the resultset
> (full DB scan can take 30-40 minutes).
> Does anyone know if it's possible to interupt/halt the query before
> it eventually comes back. The setQueryTimeout works OK but this has to be
> set quite high to allow real queries to run correctly. What I'm trying
> to do is allow users to halt their query if they've realised they
> want to alter it or its taking too long. The query is running in a
> separate thread and I've tried using the main thread to close the
> connection or stop the query but this still waits until the resultset
> is returned.

You will have to examine the documetation for the JDBC driver. Most
client APIs for SQL Server supplies functions for asynchronous calls.
With a asynch call, you could then issue a cancel request (again this
is offered by most client APIs).

microsoft.public.sqlserver.jdbcdriver may offer more exact answers with
regards to that driver.

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

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp