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

Friday, March 30, 2012

One format can connect to Sql Server but others cannot

I have setup a SQL Server 2000 database on a remote machine. In the SQL's Enterprise manager I can connect remotely to the database and perform operations. In Visual Studio 2005 I can create a new data connection only using ODBC to connect. Also I can ISQL to the remote machine with no problems.

But when I try to connect using the driver Microsoft SQL Server (SQL connect) as the underlying connection platform in VS Studio, it cannot create a data connection that way, nor can I programmatically connect to the database using the .Net data driver. They timeout....

Setups

Windows Authentication used.
On remote Windows 2003/IIS6 I have local admin privlidges (domain/username) .
My remote account (domain/username) is an admin in the database
Remote has local copy account, same name/ password for impersonation.
Web service (see error #2) impersonates as my client account. (Anonymous access (true) -> my domain account/password and Autenticated access: Integrated Windows authentication set to true)

Error Messages

Direct from code (console app calling .Net data provider) to assembly doing the DB work.

System.Data.SqlClient.SqlException : Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.


Direct From Web Service to assembly doing the DB work

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.


Visual studio 2005 timesout in trying to make connection using Microsoft SQL Server (SQL connect) but can connect via ODBC>

Please advise / advTHANKSance

have you confirmed that Sql Native Client is installed correctly on the server?

In a nutshell, SQL Native Client is a stand alone data access Application Programming Interface (API) that is used for both OLE DB and ODBC. It combines the SQL OLE DB provider and the SQL ODBC driver into one native dynamic link library (DLL) while also providing new functionality above and beyond that supplied by the Microsoft Data Access Components (MDAC). SQL Native Client can be used to create new applications or enhance existing applications that need to take advantage of new SQL Server 2005 features such as Multiple Active Result Sets (MARS), User-Defined Types (UDT), and XML data type support.

Derek

|||Even though the error message hints at 2005, the sql server is a 2000 server. Does SNC still apply?|||

i was/am assuming this is in the context of a SQL Server Project? Meaning you can only target SQL Servers 2005+ and by default the connection manager uses SQLNCLI.

Derek

sql

Friday, March 23, 2012

OMG, Having so much trouble connecting my SQL database/server to Dreamweaver

I think its my server because I cant get it to link up to an Access data base
either, heres the error I get.
[DBNETLIB]ConnectionOpen (Connect()),]SQL Server does not exist or access
denied.
Im pretty sure that all the fields that I entered are correct though.
What could be the problem?
The connection string is right I believe. How do i configure the network
protocol?
Jean-Pierre Riehl wrote:[vbcol=seagreen]
>What is your connection string ?
>Have you configure the right network protocol in SQL Server Configuration
>Manager ?
>--
>Jean-Pierre Riehl
>http://www.blog.djeepy1.net
>http://www.bewise.fr
>[quoted text clipped - 6 lines]
|||To configure your allowable network protocols...
SQL 2000 you are going to use the "Server/Client Network Utilities" located
in your program files...
http://msdn2.microsoft.com/en-us/library/aa213770(SQL.80).aspx
Basically make sure that TCIIP is in the enabled box.
In SQL 2005 you can use your "Surface Area Configuration" Tool
http://msdn2.microsoft.com/en-us/library/ms173748.aspx
thanks,

/*
Warren Brunk - MCITP,MCTS,MCDBA
www.TechIntSolutions.com
www.RealWorldSQL.com
*/
"Qaiphyx" <u40439@.uwe> wrote in message news:7dcd267ca767e@.uwe...
> The connection string is right I believe. How do i configure the network
> protocol?
> Jean-Pierre Riehl wrote:
>

Wednesday, March 21, 2012

OleDbConnection with MSDE

I'm trying to connect to a MSDE database using the following code:


'set up connection
dim myConnection as new OleDbConnection("Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=LearnASP_DB;Integrated Security=SSPI;Connect Timeout=30")

'open connection
dim myCommand as new OleDbDataAdapter("select * from tblUsers",myConnection)

'fill dataset
dim ds as DataSet = new DataSet()
myCommand.Fill(ds, "tblUsers")

And I'm getting the following error:

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

Can someone tell me what I'm doing wrong?

Thanks in advanceI am pretty sure you should use (local) instead of localhost for the Data Source.

Terri|||localhost calls the webserver. (local) is the correct syntax.

should also add that if you're using "Provider=SQLOLEDB;", you might as well use System.Data.SqlClient|||you said if I'm using Provider="SQLOLEDB" I migh as well use System.Data.SqlClient

What are my other choices for Provider?
And what the difference between OleDbConnection and SqlClient?

Thanks again|||SqlClient was made specifically as the namespace to use for SqlServer. No "Provider" is needed.

http://able-consulting.com/dotnet/adonet/Data_Providers.htm#SQLClientManagedProvider|||thanks for you help :)

OleDb Source Error - Connecting to Oracle 9i

Hi,
I have my datasource in Oracle9i and destination is Sql2005. I am connecting to Oracle 9i through OLEDb provider and when I connect to my DataSource using OLE DB Data Source, I get the following error:

Warning at "guid code": Cannot retreive the column code page info from the oledb provider. If the component supports the "DefaultCodePage" property, the code page from that property will be used. Change the value of the property if the current string code page values are incorrect. If the component does not support the property, the code page from the component's locale Id will be used.

Could anyone please help me trouble shoot this problem.

Regards,
Sudhakara.T.P.
sudhakaratp@.hotmail.com

Hi,

Click on the OLE DB Source component and check for the properties, you have to keep the property "Alwaysusedefaultcodepage" to true.

Hope this will help you.

Regards,

Raju

|||

Hi Raju,
Thank you very much for your help.
Well, I was not aware of this option and it helped me a lot to finish my work.

Regards,
Sudhakara.T.P.
sudhakaratp@.hotmail.com

OLEDB Provider Errors

I have an asp page that is using OLEDB to connect to SQL
Server 2K (We'll call it 2k1). It requests data from a
view on 2k1 which via linked server points to a an
instance of SQL Server 7.0 on a different box (We'll call
it 702). In running this command we receive very
sporadic errors. There are two in particular. Both are
regarding the transactions being used for the open
connection. Every thing I read points to using explicit
transactions which we are not. The error will last for
about 20 minutes and just disappear. The developers
stating that they are definately closing connections. I
don't know how to proceed.
Here are the errors.
1.
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'SQLOLEDB' reported an error.
[OLE/DB provider returned message: Connection is busy
with results for another command]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB'
IOpenRowset::OpenRowset returned 0x80004005: ].
2.
Server: Msg 7392, Level 16, State 2,
Could not start a transaction for OLEDB
provider 'SQLOLEDB'. [OLE/DB provider returned message:
Only one transaction cant be active on this session.Are you using Transaction Object
try use the connection's tranaction objectsql

Tuesday, March 20, 2012

OLEDB provider error.

Hi:

I have created a cube and deployed in sql server. I am trying to connect to analysis services to access cube with linked server. I am getting this error...how do i fix this.?

OLE DB provider "MSOLAP" for linked server "(null)" returned message "Errors in the OLE DB provider. The Extended Properties property is set to a value that is not supported.".

Msg 7373, Level 16, State 2, Line 1

Cannot set the initialization properties for OLE DB provider "MSOLAP" for linked server "(null)".

Thanks,

Pramod

What's your Extended Properties? Please check whether there is any typo.|||

Xinwei:

Extended properties for my database is null...

Thanks,

Pramod

|||

Just leave it blank like this: Extended Properties="".
What's your whole connection string?
Thanks.

|||

Xinwei:

This is the query i am using...

SELECT a.* FROM OPENROWSET( 'MSOLAP','DATASOURCE=PKUMAR\PKUMAR;

Initial Catalog=Analysis Services Project1;', 'SELECT Measures.members ON ROWS,

[Product Category].members ON COLUMNS FROM [Adventure Works Internet Sales]') as a

go

Thanks,

|||The problem is on the Extended Properities as the error msg stated. If you have nothing to specify, please try delete it.|||Yep...it didnt help|||I am moving this to the SQL Server Analysis Services Forum.

Monday, March 12, 2012

OLE-DB ?

Hai,

I have developed an SDI application in VC++ 6.0 version to connect remote MSSQL server through "OLE-DB" in Windows 2000 Proffesional . Through the IDE,i have selected "OLE-DB provider for ODBC Driver ".

I have used two threads, one for computation and another for accessing database. In the database thread, for every 2 second the rowset is opened, updated and closed. In the Second thread, for every 10 millisecond data is computed.

My Code looks like,

xxView.cpp

Database Thread()
{

for(;;)
{
Waitforsingleobject(x,2000) // Two second event
{
m_pSet->Open();

// Update data
m_pSet->SetData();
m_pSet->Close();
}
}
return 0;
}

xxapp.cpp

Comput Thread()
{

for(;;)
{
Waitforsingleobject(x,8) // event
{
//Compute data

}
}

return 0;
}

The application is in debug mode, well application work in development PC. When i deploy the application in a Client PC for testing with debug mode, the application works well for first few hours, then the application lags. The computation thread is delayed in seconds.

In the client PC i have installed MDAC 2.8.

* What could be the reason? Is it due to the sharing resources of "Msvcrt.dll".

* Also another application uses the same database.

* Do i have to statically link the MFC Dll?

Thanks in Advance.

There can be varieties of reasons such as memory leak, network condition changes, antivirus softwares and many others. You can profile your code (by adding trace/log point around APIs and to narrow down the issue.

Thanks,

ole server login dialog box

I am trying to connect to sql server 2000 from a windows
95 machine and windows 98. Both give me the same problem.
There is no server listing in the login dialog box and it
won't allow me to type it in. The error is unable to
connect to data source.
The workaround is to code it in the registry, but that is
not acceptable.
The connection works fine in windows 2000, NT and XP.
Any ideas?
Thanks.What dialog box are you referring to? Are you talking about registering the
server in Enterprise Manager? Connecting through Query Analyzer? Can you
use OSQL and pass the server name as -S?
What does "won't allow me to type it in" mean? Do you get an error or it
won't let you click inside the dialog box?
What exactly do you add to the registry to make it work (what key and what
value)?
Cindy Gross, MCDBA, MCSE
http://cindygross.tripod.com
This posting is provided "AS IS" with no warranties, and confers no rights.

Wednesday, March 7, 2012

Ole DB Example For Windows Mobile 5.0

Dear All:

Is there a tutorial for WM5.0 to connect to SQL CE 3.0 using Ole DB using the headers:

#include "ca_merge30.h"

#include "ssceoledb30.h"

#include "ssceerr30.h"

The example Northwind at "Sql Mobile 5.0" doesn't works with WM5.0 SDK, due to imcompatibility issues. It works with the WM2003 sdk, but i'm programming in native c++ for WM5 devices.

I'm using the header from SQL Everywhere.

Thanks.

Alfredo Mendiola Loyola

Lima PerĂº

Please look at the KB articles

http://support.microsoft.com/default.aspx?scid=kb;en-us;914174&sd=rss&spid=2852

and the following post on this forum

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=313150&SiteID=1

Thanks

Arun

Saturday, February 25, 2012

OLE DB Command

Hi All.
I'm using OLE DB Command in order to update my oracle DB. I use MS provider to connect to oracle (I tried the oracle provider too).

I try to execute the simple query as

UPDATE TABLE1
SET
VALID_DATE_TO = to_date(?,'dd/mm/yyyy')
WHERE UNIT_CODE=?
AND VALID_DATE_TO = to_date('01/01/9999','dd/mm/yyyy')

I declare the appropriate parameters.
So, the error is fell:

[OLE DB Command [1247]] Error: An OLE DB error has occurred. Error code: 0x80040E07. An OLE DB record is available. Source: "Microsoft OLE DB Provider for Oracle" Hresult: 0x80040E07 Description: "ORA-01861: literal does not match format string ".

[OLE DB Command [1247]] Error: The "input "OLE DB Command Input" (1252)" failed because error code 0xC020906E occurred, and the error row disposition on "input "OLE DB Command Input" (1252)" specifies failure on error. An error occurred on the specified object of the specified component.

[DTS.Pipeline] Error: The ProcessInput method on component "OLE DB Command " (1247) failed with error code 0xC0209029. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.


What is this?!!

Any ideas ...

Thanks in advance.

Eli

What type is your first parameter? It must be a string judging by the SQL, and that string must already be formatted in dd/mm/yyy format. Is that so?|||

yes, the first parameter is string in 'dd/mm/yyyy' format.

|||

Maybe you just cannot use a parameter in this way. We are now pushing my Oracle limits, but perhaps the equivalent of a SQL Profiler trace might shed some light on what is really happening to that parameter. For SQL Server I would expect all sorts of calls preparation and passing paramaters that would make some sense in this context.

An alternative is to convert the string column to a date in the pipeline, Derived Column or Data Conversion, and dispense with the to_date alltogether.