Database Connection Working In Vs 2003 But Not In Vs 2005

Nov 21, 2006

Hi, I'm fairly new to the asp.net enviroment.. I have a project in asp.net and I need to upgraded to asp.net 2.0... I just did that, and the few errors that I got are resolved already, the only error that I have not been able to figure out is when I tried to retrieve data from a database I get the following error:

An error has ocurred while establishsing 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.(provider:Named Pipes Provider, error:40- could not open a connection to SQL Server)  and it points to the following line:


Dim ds As DataSet = Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(ConfigurationManager.AppSettings(GlobalD.CfgKeyConnString), CommandType.StoredProcedure, "PG_LST_MENU_BY_SUBJECT")
As I said before my project with the previous version works fine, and this is the only part that is giving me trouble...
thank you  

 



 

View 1 Replies


ADVERTISEMENT

Connection From Acces 2003 To SQL Server 2005

Dec 10, 2006

What is the fastet connection between access 2003 to sql server 2005?

View 2 Replies View Related

Connection From XP SP2 To Windows 2003 R2 With SQL Server 2005 Failed

Jul 16, 2007

I cannot make named pipe connection with client by ODBC DSA.
Here is information. Refering to http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1.
[1] Client side:
1. What is the connection string in you app or DSN? (please specify) ODBC \[SERVER_NAME]pipesqlguery
2. If client fails to connect, what is the client error messages? (please specify) Connection failed: SQLState: €™01000€™ SQL ServerError: 1326 [Microsoft][ODBC SQL Server Driver][Named Pipes]connectionOpen (Connect()) Connection failed: SQLState: €™08001€™ SQL Server Error: 17 [Microsoft][ODBC SQL Server Driver][Named Pipes]SQL Server does not exist or access denied.
3. Is the client remote or local to the SQL server machine? [Remote | Local]
4. Can you ping your server? [YES | NO ]
In cmd.exe console, type €œping -a <server_name>€?.
5. Can you telnet to your SQL Server? [YES | NO, please specify the error message ]
In cmd.exe console, type €œtelnet <server name> port, where port can be 135, 445 or sql_server_tcp_port. If your cmd.exe console turns into a complete black screen with a cursor flushing on top left corner, you are connected. Type ctrl+€™[€˜ to bring up telnet prompt and type €œquit€? <enter>.
6. What is your client database provider? [SNAC | MDAC | ADO.NET1.0 | ADO.NET2.0| other ODBC (please specify] Or/And, what is your client application? [SQL Management Studio | SQL Profiler | Visual Studio | Other (please specify).
7. Is your client computer in the same domain as the Server computer? (Same domain | Different domains | WorkGroup)
8. What protocol the client enabled? [Shared Memory | TCPIP | Named Pipes].
9. Do you have aliases configured that match the server name portion of your connection string? If so, please check if it is correct. You can use cliconfg.exe (SS 2000) or SQL Server Configuration Manager (SS 2005) to configure the alias. [NO]
10. Do you select force encryption on server and/or client? [NO]


I was able to connect with TCP/IP settings.
[2] Server side:
1. What is the MS SQL version? [SQL Server 2005]
2. What is the SKU of MS SQL? [Enterprise | Standard | Workgroup | Express (or MSDE) | other (please specify)].
3. What is the SQL Server Protocol enabled? [Shared Memory | TCPIP | Named Pipes ]. Use SQL Server Configuration Manager to configure it and check ERRORLOG or event log to confirm.
4. Does the server start successfully? [YES | NO] If not what is the error messages in the SQL server ERRORLOG?
5. If SQL Server is a named instance, is the SQL browser enabled? [YES | NO]
6. What is the account that the SQL Server is running under?[Local System | Network Service | Domain Account]
7. Do you make firewall exception for your SQL server TCP port if you want connect remotely through TCP provider? [YES | NO | not applicable | not enabled]
8. Do you make firewall exception for SQL Browser UDP port 1434? In SQL2000, you still need to make firewall exception for UDP port 1434 in order to support named instance.[YES | NO | not applicable | not enabled]


I could connect locally with named pipes.
Do I have to make some file shares manually?
[2a] Tool Used to Connect
What tool or Application are you using to connect to SQL Server (eg: Visual Studio, SQL Server Management Studio, SQLCmd.exe, OSQL, etc) and especially the version of SQL Server (Express, Workgroup, Standard, Enterprise, Developer)
[3] Platform:
1. What is the OS version? [Windows XPSP2 | Windows 2003 | Windows 2000 | Windows 98 | others (please specify ) ].
1. Server [Windows Server 2003 R2]
2. Client [Windows XP SP2]
2. Do you have third party antivirus, anti-spareware software installed? [Symantec | Norton | other (please specify) ½ NO].


[4] Misc:
1. If you have certificate configuration issue: Please use €œcertutil.exe €“v €“store my€? to dump certificate specific info and post it in your question. [NO]

View 1 Replies View Related

DB Connection From Visual Studio 2003 To Sql Server 2005

Jun 1, 2007

I have one computer running Visual Studio 2003, and another running SQL Server 2005. I am trying (unsuccessfully) to add a connection to a sqlDataAdapter from an application in the Visual Studio 2003 computer to the db on the SQL 2005 machine.

If I go to the machine running sql 2005, where I am running visual Studio 2005, I can create this connection with no problems.



Is there a way fromvisual Studio 2003 to create a sqlDataAdapter with a connection to SQL 2005?



View 3 Replies View Related

Problem With Access 2003 And Sql Server 2005 Express Connection

Dec 5, 2007

I have an Access 2003 project (sp2) and the data in SQL Server 2005 Express.
My problem is when I try to make querys, diagrams, etc in Access, a warning tell me that I have installed a version of Access that is older than the version of SQL and all the designs that I make not be saved, and recommend a service pack for Access 2003 to correct the problem.
Can anybody help me, where is this SP??

View 1 Replies View Related

SQL Server 2000 + 2005 Working On Same Windows 2003 Server As Seperate Instances

Nov 20, 2006

Hi all,I just asked some people to help me out and phone microsoft with thefollowing information, kindly they refused unless we setup a supportcontract with them first, for pre-sales information. (That really doesnot sound like good business sense to me - anyway here is our problem,if anyone could help thanks)."To tell and ask microsoft:We will be setting up a microsoft sql server 2000 instance running on awindows 2003 server.1) We need to check this can run alongside a microsoft 2003 sql server(either workgroup or standard edition), on the same machine. Are thereany .dll clashes if we do this? If there are can we run SQL Server2000, in a virtual machine running windows 2000 professional. (I have alicenced copy we can use for this).2) If we run one instance of 2000, and one of 2003 of the sql servers,can one use the processor licence model, and one use the CAL licencemodel."Thanks for any help, and any idea why they actually force you to usenews groups for pre-sales information?David

View 4 Replies View Related

SQL 2005 Express - Remote Connection - Windows 2003 - MSKB 914277

Dec 18, 2007

Hey all!

I've tried all I know in an effort to get SQL 2005 Express to allow remote connections on my customer's 2K3 server and I'm not having any luck. I've followed MSKB 914277, including adding the exceptions to their Windows firewall...even disabled the firewall altogether (for testing purposes), and I still can't get remote clients to connect. As suggested by various other posts, I used netstat -an to confirm that SQL is listening on port 1433 for the desired IP on the server.....and saw that it is listening. Here's a snippet:

TCP 192.168.0.2:1433 0.0.0.0:0 LISTENING
TCP 192.168.0.2:1433 192.168.0.2:1738 ESTABLISHED
TCP 192.168.0.2:1738 192.168.0.2:1433 ESTABLISHED
TCP 127.0.0.1:1433 0.0.0.0:0 LISTENING

I can connect to the database locally (i.e. on the 2K3 server itself) using just the IP address .... tried with a DSN, UDL, ODBC, and SSMSE...all of which have no problems (as shown by the two, "ESTABLISHED" entries in the netstat results above which were from running SSMSE locally on the server at the time of the netstat). But if a remote computer on the network tries to connect, they cannot connect. Sorry, I don't have a copy of the error message the clients are getting yet.

I asked The customer's IT to confirm that the clients CAN can "see" the server (i.e. that there wasn't some kind of router or firewall blocking their path) and they sent me a copy of the server's pfirewall.log file. Here is an entry from the file that seems to show that client requests ARE getting to the server:

2007-12-17 19:12:13 OPEN-INBOUND TCP 192.168.0.4 192.168.0.2 1213 1433 - - - - - - - - -
2007-12-17 19:12:13 CLOSE TCP 192.168.0.2 192.168.0.4 1433 1213 - - - - - - - - -

I'm starting to get in over my head here (I'm a programmer, not a DBA or Net Admin), but doesn't the above suggest that an incoming request came in from .4 on port 1213 and attempted to connect to .2 on port 1433, but the connection was denied or dropped by the server? If so, why? Is this related to another MS KB I read about connection pooling? I'm way over my head here and could use some help. Did I miss something subtle during configuration of SQL Express?
Thanks in advance.

View 2 Replies View Related

.Net 2003 Access Crystal Report XI: Error:Failed To Open The Connection: [Database Vendor Code: 17 ]

Sep 19, 2006

I am receving this error: Failed to open the connection: [Database Vendor Code: 17 ], from .Net 2003/C# to Crystal Report XI with SQL Server 2000 has backend database.

Is there a security permission that has been overlooked?

Here is the code I use to access CR XI

ConnectionInfo connectionInfo = new ConnectionInfo();
TableLogOnInfo tableLogOnInfo;
Database DB;
'CrystalDecisions.CrystalReports.Engine.Table' table;
Tables tables;

//Log in
connectionInfo.ServerName = "ServerName";
connectionInfo.DatabaseName = "Database Namet";
connectionInfo.UserID = "userid";
connectionInfo.Password = "password";

//Get Table inf from report
DB = reportDocument..Database;
tables = DB.Tables;


//Looping through all the tables in CR and apply connection info
for(int i = 0; i < tables.Count; i++)
{
table = tables[ i ];
tableLogOnInfo = table.LogOnInfo;
tableLogOnInfo.ConnectionInfo = connectionInfo;
table.ApplyLogOnInfo(tableLogOnInfo);

}

CrystalReportViewer.ReportSource = ReportDocument.ReportSource;
CrystalReportViewer.Visible = true;

Any advise would be helpful.
Thank you

View 6 Replies View Related

Creating A Database In SQL 2005 - Using Windows 2003

Nov 3, 2006

when i try to create a new database i get a error: The server could notload DCOMwhat is wrong and how can i fix it?i have updated mssql/win 2003 with the lates updatesRgdsBobby

View 1 Replies View Related

Working With An Online And Office SQL Server 2005 Database

Sep 18, 2006

I'm not experienced with SQL Server 2005.I've got a live copy of my database running on the web server.I've got another copy running on my desktop that I make changes to.Whats the best way to sync between the two so:1. I don't have to take the application offline2. I don't loose any data from the live database3. But I can implement changes to tables and/or add new tables 

View 1 Replies View Related

Database Conversion From SQL Server 2005 To 2000 Is Not Working

Aug 1, 2006

hello friends,
i am facing a problem in SQL Server 2005 Express Edition. The database created in the SQL Server 2005 Express is when opened in SQL Server 2000, it changes the data type of all the columns of all the table to text type. can anybody help me?

View 4 Replies View Related

Win 2003 X64 + SQL 2005 &< Win 2003 32 + SQL 2000?

Jul 23, 2005

I may not be the best forum for this post, however I believe some onecan still help me or direct me somewhere else.I'm finding that win 2003 x64 and SQL 2005 CTP is slower than win 2003and SQL 2000.Machine A: Opteron 2.2 (248) w/ 2 cpus. 8GB memory. SCSI disk array.Windows Enterprise 2003 x64 final release. SQL Server 2005 enterpriseCTP.Machine B: Opeteron 2.2 (248) w/ 2 CPUs. 4GB Memory. IDE Drives.Windows Server 2003 (32bit) and SQL Server 2005 (standard).I'm using Cognos' DecisionStream as the ETL tool (32bit). I have theidentical job on both machines. Machine A is slower to do my nightlybuild (1h 20m) vs. Machine B (50m).I've done no tweaking of the databases. I Used SQL 2005's studio tocopy the database from Machine B to Machine A.The only major difference is the O/S and SQL, the machines are samespeed, however Machine A has twice the memory and faster disk; so Iwould expect it to be faster.Can anyone think of smoking guns I might be missing?TIA

View 2 Replies View Related

Check Database Integrity In Maintenance Plan Not Working In SQL Server 2005 SP2

Apr 13, 2007

I installed SQL Server 2005 Enterprise, then SP1 and then SP2, Maintenance Plan worked. But if I installed SQL Server 2005 Enterprise and then SP2 directly (skipping SP1), the Check Database Integrity in Maintenance Plan was not working. The error message is as follows:



Executed as user: DomainSqlServiceAccount. Microsoft (R) SQL Server Execute Package Utility Version 9.00.3042.00 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 10:56:21 AM Could not load package "Maintenance PlansTest Plan" because of error 0xC0014062. Description: The LoadFromSQLServer method has encountered OLE DB error code 0x80004005 (Login failed for user ''. The user is not associated with a trusted SQL Server connection.). The SQL statement that was issued has failed. Source: Started: 10:56:21 AM Finished: 10:56:21 AM Elapsed: 0.047 seconds. The package could not be loaded. The step failed.




Other tasks like Rebuild Index seem to be fine. SP2 is supposed to be inclusive. Does anyone have any ideas on why this is happening.



Thanks



E.G.

View 10 Replies View Related

ODBC Connection From Access 2007 Database To SQL Server 2005 Database

Feb 29, 2008

I need detailed instructions on how to connect to a database from a Microsoft Access 2007 database to a Microsft Office Accounting 2007 database. The accounting database is an SQL 2005 datbase. It has an instance name of "MSSMLBIZ".

When I try I get an SQL error 53. Do not have permissions or database does not exist.

Thanks in advance for any help.,

View 1 Replies View Related

Some Things Not Working In 2005 And Working In 2000

Mar 3, 2006

hi

I had a view in which I did something like this
isnull(fld,val) as 'alias'

when I assign a value to this in the client (vb 6.0) it works ok in sql2000 but fails in 2005.
When I change the query to fld as 'alias' then it works ok in sql 2005 .
why ?? I still have sql 2000 (8.0) compatability.

Also some queries which are pretty badly written run on sql 2000 but dont run at all in sql 2005 ???

any clues or answers ?? it is some configuration issue ?

Thanks in advance.

View 5 Replies View Related

SQL Mobile In Pocketpc 2003 Se Desktop Connection

Aug 2, 2006

Hi

I'm developing a pocketpc 2003 application with visual studio 2005. It has a sql server mobile sdf file call datos.sdf.

I need to create a Windows Desktop application and i need to connect it when pocketpc is connected to desktop with activesync.

Any ideas or links with some code samples?

I have installed sql sever everywhere but i don't understand how i can do that connection.

Thanks

View 3 Replies View Related

User Instance Connection From Excel 2003

Apr 13, 2008

Hi

I am trying to connect to SQL Express from Excel VBA using an user instance.
I have tried the following connection string:

Driver={SQL Native Client};Server=.SQLExpress;AttachDbFilename=full_path_to_mdf; Database=dbname;Trusted_Connection=Yes;

And I get the following error : Could not open new database 'dbname' CREATE DATABASE is aborted.


Any ideas on what I am doing wrong?

All I want is an Excel document to connect to a .mdf that is stored on a CD (The database will be readonly). I do not want the database to be stored on the users hard drive.

Many Thanks

MP

View 3 Replies View Related

Vc++ 2005 Connection Access Database

Aug 16, 2007



Dear all
if i want to write one program use vc++2005 to connection access database with MFC system , which idea is best.
does any sample code i can use in this case or any concept i can read it first?

best regard
roger

View 1 Replies View Related

JDBC Connection Fails After Windows Server 2003 SP2

Apr 3, 2007

In testing new patches, I tried Windows 2003 Server SP2 and our JDBC connections stopped working. I uninstalled SP2 and they started working again. Anyone know where the problem is?



I have already read pages of documentation, but I will keep looking. Please let me know if you know the setting that needs to be changed. I'm assuming it is a new "security enhancement" but I'm just not sure exactly where.



Thanks in advance.

Hugh

View 8 Replies View Related

How To Establish Connection Between SQL Server Database && VWD 2005

Mar 24, 2007

I just got a shared hosting plan with godaddy (economy plan) ...
I wrote a simple application with a database. it works fine on my local PC.
I tried to upload my files to the server, but i couldn't get database file on godaddy's server. I did a little research and found out they dont allow uploading database files to their server nor they allow remote access either.
so I logged in to my account and found a database links and I created one (SQL Server)




Host Name
whsql-v44.prod.mesa4.secureserver.net



Database Name
DB_43434



Database Version
2000



Description
maindb
I then logged in to the database and created a new table .. but now I dont know how to make a connection between this database and my application on my pc.
I later found that I must modify my web.config file for the database to work. http://help.godaddy.com/article.php?article_id=689&topic_id=216&prog_id=GoDaddy&isc=

<connectionStrings><add name="Personal" connectionString="Server=whsql-v04.prod.mesa1.secureserver.net;Database=DB_675;User ID=user_id;Password=password;Trusted_Connection=False" providerName="System.Data.SqlClient" /><remove name="LocalSqlServer"/><add name="LocalSqlServer" connectionString="Server=whsql-v04.prod.mesa1.secureserver.net;Database=DB_675;User ID=user_id;Password=password;Trusted_Connection=False" providerName="System.Data.SqlClient" /></connectionStrings>
Now- I am new to web developing, but I do understand that this code is not enough to create the connection to the database. I researched alot but I cant get further.
 What code/ settings/ steps do I need to do to get my gridview and other database items connect to the database on godaddy's server ?
any help would be greatly appreciated...
 

View 1 Replies View Related

Setting The Port For The Database Connection In Vs 2005 And Also In Web.xml

Feb 15, 2006

I've mapped a sqlserver machine within vs2005, but when I attempt to set the database connection, I dont see place to stick the port number (even in the advanced area)... it continues to fail when I test the connection.. I can telnet into the machine on the sql server port, so I know its open to me...
Also - when I publish this to an IIS server, what is the syntax for placing the connection and port number in web.config?  I've tried various settings, cant get it to work. <appSettings><add key="con" value="Server=12.123.123.123;PORT=1234;UID=*****;PWD=*****;database=mydb" /></appSettings>
 
Thanks in advance for the help,
Todd

View 3 Replies View Related

Database Connection SQL Express 2005 Remote

Jan 2, 2008

Good day.

I am trying to look at a friends database that they have developed. Not having used SQL Server Express before I am experiencing problems trying to remotely connect to their database.

He connects locally just fine of course.

I get the error message about remote connectionsand the default settings so I have enabled TCP/IP and Named Pipes as well as cleared SQLSERVER Express in my firewall settings. I also stopped and restarted the service, but still get the same error message.

My connection parameters are like:

Server type: Database Engine
Server name: http://sql.exampledatabase.net (should http be here? have tried with and without same error)
Authentication: SQL Server Authentication (windows authentication? If so, how do I change to such?)
Login: http://username (should http be here? have tried with and without same error)
Password: password

TITLE: Connect to Server
------------------------------
Cannot connect to http://sql.exampledatabase.net

ADDITIONAL INFORMATION:
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. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

Any help would be much appreciated.
BurntBack

View 5 Replies View Related

How We Can Drop Connection To SQL Server 2005 Database ?

Aug 6, 2007

Hi,

We can see current connections while trying to detach the database through SQL server 2005 Management studio.
Is there any way to drop all existing connections to an SQL server 2005 database with out detaching it.

Thanks

View 7 Replies View Related

ODBC Connection Failing On 64 Version Of Windows 2003 Server

May 3, 2006



I have an application that talks to a SQL backend using an ODBC DSN connection. It works fine when running on a 32bit machine but fails in the 64bit environment. The DSN is setup properly on the 64bit box and the Test Connection returns sucess. However when my application tries to use the DSN to connect to the database I recieve the following error.

IM002 - Data source name not found and no default driver specified.

The data source name does exist, it's in the ODBC.INI and in registry. As mentioned above the Test Connection succeeds in the ODBC Administrator so logic would dictate that it's setup correctly.

Any help would be appreciated.

View 22 Replies View Related

Slow ADO Connection Speed Vista Vs XP To SQL2005 / Server 2003

Jan 31, 2008

I have an application written in VB6 that creates a ADO connection using the (native SQL2005 clien)t from the client to SQLServer 2005 on Server 2003 configured as a stand alone server. The application works great on XP and has for a number of years.

Now I am attempting to deploy in Vista and using the same code the connection speed CRAWLS. it's in the magnitude of atleast 10 times slower. It eventualy works but the selects and doing a readnext against the resulting record set is at a snails pace.

What am I missing. It's has to be some sort of configuration problem somewhere.

View 2 Replies View Related

Slow Connection Wirt Access 2003 To SQL Server Under Vista

Nov 15, 2007

I have an application built with Access 2003 (MDB). It is running under Windows XP without any problems. If I run it under Vista, it works technically well but I get the data very slow from the server.

Server:
Windows Server 2003 R2, SP2
SQL Server 2005, version 9.00.3054.00
Firewall: off

Client:
Access 2003, SP3

Connection strings:
ODBC;DRIVER={SQL Native Client};UID=SD_Admin;DATABASE=SDX;SERVER=MARS;PWD=xxx;
or

ODBC;DRIVER={SQL Native Client};DATABASE=SDX;Trusted_Connection=Yes;SERVER=MARS;

Windows Firewall on client: off
Onecare Firewall on client: off




How can i Fix this issue?

View 2 Replies View Related

Connection String To SQL Server 2005 Express Database

Apr 10, 2008

Hi, all. I am using VS.NET 2005 and SQL Server 2005 Express. I tried to use the following code to connect to a database named "AMSPROD" that I attached to SQL Server 2005 Express:
 dbConn = new OleDbConnection(Data Source=.SQLEXPRESS;AttachDbFilename="C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataAMSPROD_Data.MDF";Integrated Security=True;Connect Timeout=30;User Instance=True);
dbConn.Open();
I got an error asking for provider with the above connection string, then I changed the conncection string to be like follows:
Data Source=.SQLEXPRESS;AttachDbFilename="C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataAMSPROD_Data.MDF";Provider=SQLNCLI;Integrated Security=True;Connect Timeout=30;User Instance=True
I got error: No error message available, result code: DB_E_ERRORSOCCURRED(0x80040E21)
Then I changed the Provider to be like: Provider=SQLOLEDB, now I am getting the following error:
Message: "Invalid authorization specification
Invalid connection string attribute"
Source: "Microsoft SQL Native Client"
StackTrace: " at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at ISESAMSData.DbConnections.MakeConnection() in C:\ISES\ISESCommon\ISESAMSData\DbConnections.cs:line 74"
TargetSite: {Void .ctor(System.Data.OleDb.OleDbConnectionString, System.Data.OleDb.OleDbConnection)}
Strange thing is, when I use the Connect To Database under Tool menu of VS.NET 2005, I could make the connection to this database. Then I copied this connection string to the code, the connection couln't be made. I feel very confused.
I am wondering if I need to add ASP.NET user to SQLExpress. But I don't know how to do it?
Can anyone please help me out! Many thanks!

View 7 Replies View Related

SQL Server 2005 Mobile: Problem With Connection To Database

Aug 3, 2006

Hi, everyone! I have a small problem.

It consists in:

1. I'm trying to connect to database on my Pocket PC within Visual Studio 2005 (C#)

Connection string looks like this:

SqlCeConnection1.ConnectionString = "data source = '\storage card\mobiluser.sdf'";

But when i'm deploying it to Pocket PC the error "An error message cannot be displayed because an optional resource assembly containing it cannot be found" appears.

2. When I'm doing te same on Pocket PC Emulator everything is normal.

Off course, I have the .sdf file on Pocket PC which is placed to Storage Card into root directory.

If anyone knows where I get a mistake, help me please!



Thanks for your help!

View 1 Replies View Related

Cannot Set Connection Property Of Backup Database Task If Connection String Is Customized In Connection Object

Aug 23, 2006

I added a connection (ADO.NET) object by name testCon in the connection manager - I wanted to programmatically supply the connection string. So I used the "Expressions" property of the connection object and set the connectionstring to one DTS variable. The idea is to supply the connection string value to the variable - so that the connection object uses my connection string.

Then I added a "Backup Database Task" to my package with the name BkpTask. Now whenever I try to set the connection property of BkpTask to the testCon connection object, by typing testCon, it automatically gets cleared. I am not able to set the connection value.

Then after spending several hours I found that this is because I have customized the connection string in testCon. If I don't customize the connection string, I am able to enter the "testCon" value in the connection property of the BkpTask.

Is this an intrinsic issue?

View 2 Replies View Related

How To Keep The Connection Working?

Apr 14, 2007

Hi,

I Have a correct connectionstring and it connected the database without any problems but once I close the program, the problems start. When I reopen the solution, I recceive error messages as

The databse already exists, choose a different database name.



What does this mean?

What happened to the connectionstring?

View 3 Replies View Related

A Couple Of Questions On Remote Connection To SQL Server 2005 Database

Nov 23, 2006

I have a SQL Server 2005 database (called BDHSE) in a PC which i call PC1. I have a second PC (PC2) and both are within a network (a WLAN).

What i want is to have access to BDHSE from an application in VB6 (APP1) running in PC2. All the INSERT, DELETE, UPDATE records process is done through APP1.

APP1 ia currently running in PC1 and is to be installed on PC2.

I have these questions:

1. What do i need to install in PC2 since all the INSERT, DELETE, and UPDATE is done using APP1? I guess i only have to install the Microsoft SQL Native Client (with all the prerequisites of course) but i am not sure.

2. In the APP1 made in VB6, do i have to change the connectionstring since i am accesing the database which physically is at PC1 and the APP1 will be used in PC2?

3. Any advice you can give me on doing this will be well received.

Thanks in advance,

BSc Fernando Martinez

View 4 Replies View Related

Asp.net SQL Server 2005 Setup. Unable To Establish Database Connection Correctly.

Feb 20, 2008

I am setting up a web server and I'm having some issues with database connections.  I am running Windows Server 2k3 and SQL Server 2005.  The error I get is when I attempt to connect to the database, it's the following:
     Cannot open database "dbReseacher" requested by the login. The login failed.     Login failed for user 'userRes'.
The following is my connection string:
    <add name="RESEARCHER" connectionString="Data Source={Sql Server}; Server=THRALL2; Database=dbReseacher; Uid=userRes; Pwd=password;"/>
In SQL Server Management Studio, the user userRes is listed under Security -> Logins, but it is not listed under Database -> dbResearcher -> Security -> Users.  Originally it was listed under both and this didn't solve the problem. 
Please let me know if you any ideas or questions that I can answer.  Thanks a lot.
                   -Richard

View 1 Replies View Related

Connection String For SQL Server Not Working

Mar 17, 2007

I have the Visual Studio 2005 Team Suite trial version and the SQL Server 2005 trial (which came with team suite) installed in my machine.
When I installed the SQL Server 2005 I installed it in the Windows Authentication mode.  So every time I open SQL Server 2005 it doesnt ask for Username/Password (Its greyed out).  The only thing available were:
Server Type: Database Engine
ServerName: ServerSue
Authentication: Windows Authentication.
Here is my Problem:
I created a small application in C#.  In the web.config file I created the following:
<appSettings>
<add key="resumecon" value="SERVER=ServerSue;database=Resume;"/>
</appSettings>
Then in the Code behind I created the following string:
string strResCon = ConfigurationManager.AppSettings["resumecon"].ToString();
Then in  method (for a Login page) I created the connection string as follows and wrote code to insert some values into the Resume database.  I called this method on a button click event.
SqlConnection conLogin = new SqlConnection(strResCon);
When I run the page and when I click the button I get the following error:
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
I think some thing is wrong in the addkey of webconfig?  How do I change this?
 

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved