Showing posts with label app. Show all posts
Showing posts with label app. Show all posts

Sunday, March 11, 2012

Cannot create ADO connection to DB anymore...

I rebuilt my machine a few weeks back - re-installed the developer version...

The app in question can see all it's tables in the SQL back end via ODBC and
everything looks normal via Enterprise Manager, but I can no longer create
an ADO Connection.

Source code is unchanged, what's changed is the PC rebuild and consequent
re-installatin of SQL Server developer version.

I suspect it's something to do with the provider (at least that's the only thing
I can see in the .Connect string that's not verifiably correct...)

The error looks like this after I trap and format it:

--------------------
12/30/03 21:34:30v0.71 Userid: UPQC on SAG
Proc: basADO: ADO_ConnectionCreate
-2147467259: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does
not exist or access denied.
Errors encountered when trying to connect:
'''[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.

----Connect String:
Provider=SQLOLEDB.1;SERVER=SAG;DATABASE=TRETS;UID= Trets;PWD=trets
--------------------

Can anybody see anything obvious to look for?

I'm thinking I need to know how to verify/validate the presence of provider
"SQLOLEDB.1"... But how?
--
PeteCresswellHi

Maybe it's a SID type problem! Have you tried a trusted connection?

John

"(Pete Cresswell)" <x@.y.z> wrote in message
news:lkd4vv89m3cdb5fnlt4rt661c47sb56jdv@.4ax.com...
> I rebuilt my machine a few weeks back - re-installed the developer
version...
> The app in question can see all it's tables in the SQL back end via ODBC
and
> everything looks normal via Enterprise Manager, but I can no longer create
> an ADO Connection.
> Source code is unchanged, what's changed is the PC rebuild and consequent
> re-installatin of SQL Server developer version.
> I suspect it's something to do with the provider (at least that's the only
thing
> I can see in the .Connect string that's not verifiably correct...)
> The error looks like this after I trap and format it:
> --------------------
> 12/30/03 21:34:30v0.71 Userid: UPQC on SAG
> Proc: basADO: ADO_ConnectionCreate
> -2147467259: [DBNETLIB][ConnectionOpen (Connect()).]SQL
Server does
> not exist or access denied.
> Errors encountered when trying to connect:
> '''[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist
or
> access denied.
> ----Connect String:
> Provider=SQLOLEDB.1;SERVER=SAG;DATABASE=TRETS;UID= Trets;PWD=trets
> --------------------
>
> Can anybody see anything obvious to look for?
> I'm thinking I need to know how to verify/validate the presence of
provider
> "SQLOLEDB.1"... But how?
> --
> PeteCresswell

Thursday, March 8, 2012

cannot copy sqlexpress to another pc for vb.net 2.0 project update

Hi. I have done alot of searching around but can't find answer to this specific problem.

Here is my connection string in vb.net app config

<connectionStrings>
<add name="myfile.My.MySettings.ffgscrmConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\myfile.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>

The database is locally attached to the vb.net project residing in a data directory in the project. I am testing installation on a virtual pc - with no sql express managment or other sql server databases attached.

When I do a vb.net setup project and run this on, there is no problem. However, once having done that, when I want to update the app, I can't just copy in the new database along with exe. I get the error:"sql server does not allow remote connections (provider:sql network interfaces error 26 - error locating server/instance specified).

Is this a problem of the virtual PC? I am testing this because I need to be able to send updates to another local machine without using setup program.


Hi,

the destination machine where you copy the files on, does that have SQL Server Express installed ? Otherwise you won′t be able to use the .\SQLEXPRESS instance which points to a local SQLExpress instance on that computer. If there is a SQLExpress instance installed on that machine, make sure you enabled remote connections on this instance. I made a screencast for that, which can be found on my site in the screencast section which will show you how to enabled the remote conenction feature.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

Wednesday, March 7, 2012

Cannot connect with ODBC using TCP/IP?

Win 2003 Small business server with IIS being used as a web server.
Our client app can log in and run queries, but our web app when trying to log in gets the message,
'SQL server does not exsist or access denied'
The system DSN's are both sql drivers and the configuration is name pipes. Our recomended specs use TCP/IP, but when I try to change it, it craps out on me. He's opened up his firewall completely to this new box and his old box, a Win2k machine can connect using TCP/IP. This machine is in a work group.
Any suggestions on what it might be? :confused:instead of dsn, try dsn-less:
http://www.connectionstrings.com/

Cannot connect w/ Java app but can connect w/ .Net app - SQL Server Express 2005

I'm having a problem connecting with a Java application but I CAN connect using my .Net application - the user name and password are the same for both (using the same database on SQL Server Express 2005).

The error I get is: "com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database "CORNERS" requested by the login. The login failed." An interesing note - I get the same message if the database is not running.

SQL Server Express 2005 is installed in mixed mode.

Here is my connection string in the .Net appplication: <add key="connectString" value="Server=(local);UID=sa;PWD=myPasswd;Database=CORNERS" />.

These are my values in my Java app web.xml -

<init-param>
<param-name>DBDriver</param-name>
<param-value>com.microsoft.sqlserver.jdbc.SQLServerDriver</param-value>
</init-param>
<init-param>

<param-name>DBURL</param-name> <param-value>jdbc:sqlserver://localhost\sqlexpress:1055;databaseName=CORNERS</param-value>

</init-param>
<init-param>
<param-name>DBUser</param-name>
<param-value>sa</param-value>
</init-param>
<init-param>
<param-name>DBPwd</param-name>
<param-value>myPasswd</param-value>
</init-param>.

And yes, the port is 1055 - I checked to find it.

I am using Microsoft SQL Server 2005 JDBC Driver 1.0 (sqljdbc_1.0.809.102).

Does anyone have any idea what is wrong so that the login fails in the Java application but works in the .Net application?

Mostlikely, you have a syntax error in your connection string.

jdbc:sqlserver://localhost\sqlexpress:1055;databaseName=CORNERS

please refer to http://msdn2.microsoft.com/en-us/library/ms378428.aspx

you can try

jdbc:sqlserver://localhost:1055;databaseName=CORNERS,

|||I tried your suggestion and it does not work. I get the same error. I tried many different variations of the connection string and none of them have worked.

I think it is important to note that I get this error even if the database is NOT running.

This leads me to believe it's a problem with the driver. I have the sqljdbc.jar located in my Tomcat\common\lib directory. Is this incorrect?|||Can you get a trace with FINEST level turned on?|||How do I turn the trace on? And to the finest level? And will this make a difference considering that I get the same message whether or not the database is actually running?|||

I'm having a similar problem. However I am using context.xml to define the connection pool as:

<Resource name="jdbc/SqlServerLocal"
auth="Container"
type="javax.sql.DataSource"
username="PortalUser"
password="********"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://servername\\SQLEXPRESS:1433"
maxActive="10"
maxIdle="4"
maxWait="100" />

and this works on my Windows development machine... but when I ftp the *.war file to the Linux server, I get the following message:

Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver'

I put the 'sqljdbc.jar' file in the /common/lib path for both installations.

|||

Adisciullo,

Please refer to the following site for information regarding turning tracing on:

http://msdn2.microsoft.com/en-us/library/ms378517.aspx

Please post the results so we can further diagnose this.

Additionally, does this problem also reproduce with the v1.1 driver. You can find it at: http://www.microsoft.com/downloads/details.aspx?FamilyId=6D483869-816A-44CB-9787-A866235EFC7C&displaylang=en

Thanks,

Jaaved Mohammed

Saturday, February 25, 2012

Cannot connect using ADO with Excel Microsoft Jet Provider 4.0

Hi:

I have a vb 6 app that exports data from sql to excel. The user has the ability to select either local or server. When they select server, the connection string is modified to include the server name instead of the local msde instance to look like this:

"provider=sqloledb;data source=MyServer;initial catalog=MyDatabase;user id=UserX;password=PasswordX;database=MyDatabase"

I'm using Microsoft Jet Provider 4.0 and OpenDataSource.

SELECT * INTO TempXL FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
'Data Source=C:\test\xltest.xls;Extended Properties=Excel 8.0')...[Sheet1$]

This code works fine when user is accessing msde on local, but when using above DSN, I receive the following message:

"2147217900 - OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEdB.4.0' IDBInitialize:: Initialize returned 0x800040005: The provider did not give any information about the error.]

When I trace the connection, these error messages occur:

Failed to set proper user name ('NT AUTHORITY\SYSTEM') for the connection

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot alter table 'TblXMyTable' because this table does not exist in database 'master'. (State 42S02) (Code 4902)

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'TblxMytable'. (State 42S02) (Code 208)

[Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error. The provider did not give any information about the error. (State 42000) (Code 7399)

[Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005: The provider did not give any information about the error.]. (State 01000) (Code 7300)

I am especially puzzled by the second message because I am specifying the database name in my connection string as:

"provider=sqloledb;data source=MyServer;initial catalog=MyDatabase;user id=UserX;password=PasswordX;database=MyDatabase"

I can read from the server copy and copy to Excel, but I cannot write back to SQL. Can someone please tell me what I'm doing wrong?

Thanks in advance for any help.,

I had a problem similar to this when working with VB6, DAO, ADO and SQL Server 2005.

One user could do a query, another user could not.

In fact, the error message was similar to yours. The error message claimed that the table we were trying to query did NOT EXIST.

So, I believe your problem lies with Security.

Try making the user a database owner of the database in question. If this solves your problem, then you can look for a way to set the permission/security correctly for the specifc tables they need access to.

Cannot connect using ADO with Excel Microsoft Jet Provider 4.0

Hi:

I have a vb 6 app that exports data from sql to excel. The user has the ability to select either local or server. When they select server, the connection string is modified to include the server name instead of the local msde instance to look like this:

"provider=sqloledb;data source=MyServer;initial catalog=MyDatabase;user id=UserX;password=PasswordX;database=MyDatabase"

I'm using Microsoft Jet Provider 4.0 and OpenDataSource.

SELECT * INTO TempXL FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
'Data Source=C:\test\xltest.xls;Extended Properties=Excel 8.0')...[Sheet1$]

This code works fine when user is accessing msde on local, but when using above DSN, I receive the following message:

"2147217900 - OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEdB.4.0' IDBInitialize:: Initialize returned 0x800040005: The provider did not give any information about the error.]

When I trace the connection, these error messages occur:

Failed to set proper user name ('NT AUTHORITY\SYSTEM') for the connection

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot alter table 'TblXMyTable' because this table does not exist in database 'master'. (State 42S02) (Code 4902)

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'TblxMytable'. (State 42S02) (Code 208)

[Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error. The provider did not give any information about the error. (State 42000) (Code 7399)

[Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005: The provider did not give any information about the error.]. (State 01000) (Code 7300)

I am especially puzzled by the second message because I am specifying the database name in my connection string as:

"provider=sqloledb;data source=MyServer;initial catalog=MyDatabase;user id=UserX;password=PasswordX;database=MyDatabase"

I can read from the server copy and copy to Excel, but I cannot write back to SQL. Can someone please tell me what I'm doing wrong?

Thanks in advance for any help.,

I had a problem similar to this when working with VB6, DAO, ADO and SQL Server 2005.

One user could do a query, another user could not.

In fact, the error message was similar to yours. The error message claimed that the table we were trying to query did NOT EXIST.

So, I believe your problem lies with Security.

Try making the user a database owner of the database in question. If this solves your problem, then you can look for a way to set the permission/security correctly for the specifc tables they need access to.

Cannot connect to sql through asp app.

iis and sql on same box. asp lan app.
I can open the initial page but get this error when i try to look up a
customer or other db dependant actions.
Microsoft OLE DB Provider for SQL Server (0x80040e4d)
Login failed for user 'sa'
/ctservice/view_edit_service/getindex.asp, line 22
the code on line 21-22:
Set connEditService = Server.CreateObject("ADODB.Connection")
connEditService.Open conString
This started when i tried to change the sa password so that i could
access the db for a mail merge. I don't have the original sa password
and i don't know if i enabled it by accident. If so how do i remove it
or fix this error? thanks jho.
On Jan 13, 4:36Xpm, jho <jhogan0...@.yahoo.com> wrote:
> iis and sql on same box. asp lan app.
> I can open the initial page but get this error when i try to look up a
> customer or other db dependant actions.
> Microsoft OLE DB Provider for SQL Server (0x80040e4d)
> Login failed for user 'sa'
> /ctservice/view_edit_service/getindex.asp, line 22
> the code on line 21-22:
> Set connEditService = Server.CreateObject("ADODB.Connection")
> connEditService.Open conString
> This started when i tried to change the sa password so that i could
> access the db for a mail merge. I don't have the original sa password
> and i don't know if i enabled it by accident. If so how do i remove it
> or fix this error? thanks jho.
I found the password for sa after searching all of the pages in the
site for, you guessed it, password duh....

Cannot connect to sql through asp app.

iis and sql on same box. asp lan app.
I can open the initial page but get this error when i try to look up a
customer or other db dependant actions.
Microsoft OLE DB Provider for SQL Server (0x80040e4d)
Login failed for user 'sa'
/ctservice/view_edit_service/getindex.asp, line 22
the code on line 21-22:
Set connEditService = Server.CreateObject("ADODB.Connection")
connEditService.Open conString
This started when i tried to change the sa password so that i could
access the db for a mail merge. I don't have the original sa password
and i don't know if i enabled it by accident. If so how do i remove it
or fix this error? thanks jho.On Jan 13, 4:36=A0pm, jho <jhogan0...@.yahoo.com> wrote:
> iis and sql on same box. asp lan app.
> I can open the initial page but get this error when i try to look up a
> customer or other db dependant actions.
> Microsoft OLE DB Provider for SQL Server (0x80040e4d)
> Login failed for user 'sa'
> /ctservice/view_edit_service/getindex.asp, line 22
> the code on line 21-22:
> Set connEditService =3D Server.CreateObject("ADODB.Connection")
> connEditService.Open conString
> This started when i tried to change the sa password so that i could
> access the db for a mail merge. I don't have the original sa password
> and i don't know if i enabled it by accident. If so how do i remove it
> or fix this error? thanks jho.
I found the password for sa after searching all of the pages in the
site for, you guessed it, password duh....

Thursday, February 16, 2012

Cannot connect to sql database using Config app tool.

hi AllI'm new comer , the first time to work with Ent lib , I try to use modify sql connection string using configuration application tool integrated in Visual Studio against sql server 200 , I got this error .

_http://imagesshared.com/images/jdv1192388741v.JPG

I don't know how to solve my problem , someone please help me to overcome this problem .Thanks in advance .sorry for my poor English , I'm a Vietnamese student .

The problem is that you're trying to connect to a Sql server express user instance, but you're in fact using Sql Server 2000. You can modify your connection string to work with sql server 2000, or you can download and install sql server express - this is a free download from here:http://msdn2.microsoft.com/en-us/sql/Aa336346.aspx .

|||

DO the following modification in the Connection String of the App.Config / Web.config ...

Remove the AttributeUser Instance =true from the connection string that should solve the issue

|||

Thanks Svante , skurocks for replying

Then I solved my problem , thanks skurocks|||

Hi All

I got this error when I try to display whole record of customers table into GridView .

_http://imagesshared.com/images/opt1192519086n.JPG

This is the first time I work with Ent Lib 3.1 .

Here is my source code , please help me and explain to me why this error occur .

_http://www.4shared.com/file/26591127/38feb983/WebSite1.html?dirPwdVerified=814e49b

Thanks in advance for your time .

.........

Regards