Showing posts with label connecting. Show all posts
Showing posts with label connecting. Show all posts

Tuesday, March 27, 2012

Access database problem

Hi, I have problem connecting SQL2000 database.

I have installed .NetFramework 1.1 before and I got (local)\NetSDK instance name. I can connect any database under without any problem. However, I recently installed another database "Costoco" into the same instance from a bak file. And I try to connect it but it fails. I run a webapplication and use datagrid to show a table and the error message is following:

Cannot open database requested in login 'Costoco'. Login fails. Login failed for user 'AARON-HOME\ASPNET'

I checked ASPNET user and I even add this user to access the whole folder of the instance in Program files/SQLserver, it still happens.

I have no idea, and could any one help me?

Thanks.

It seems that the login have not been granted access to the new database. Please click 'Start'->'All Programs'->'Microsoft SQL Server'->'Enterprise Manager'. In EM, choose the 'NetSDK'instance, explore Security->Logins, find the login used in your application, double click it. In the Properties window, goto Data Access pannel, make sure the check box of the new database selected. Click 'ok' to save your change, then try again.|||Thanks a lot, It works!!!

Thursday, March 22, 2012

Access AS400 DB2 in SQL Server

Hi,

Im finding the way of connecting to DB 2 database which is exixst in the AS400

machine to do some data manupulation.Please attach the SQL cording.

Thanks

Pubudu

You can try any kind of odbc drivers, for example, RUMBA ODBC Drivers

http://www.netmanage.com/customers/stories/lear.asp

it works

sql

Tuesday, March 20, 2012

Access 2003 Project Connecting to SQL 2000 & 2005 Servers

We have an Access 2003 Project that it's primary server is a SQL 2000 server. When I link a table to the 2000 server and execute the view, I get data with no problem. I link a table to the 2005 server and execute the view...once again, no problem. However, if I try to write a query to pull data from both views......times out. I have changed the timeout value to "0" and never returns the data.

So then I created a new Access 2003 Project to use the 2005 as the primary server. Once again I create a linked table and execute the view on the SQL 2000 server and it works just fine. Then create a linked table to the 2005 server and the view works just fine. However, here's the difference. When I try to create a query to pull data from both views, I get:

  1. This version of Microsoft Office Access doesn’t support design changes with the version of Microsoft SQL Server your Access project is connected to. See the Microsoft Office Update Web site for the latest information and downloads. Your design changes will not be saved.

  2. You have connected to a version of SQL Server later than SQL Server 2000. The version of Visual Studio or Access that you are using was released before the version of SQL Server to which you are connected. For this reason, you might encounter problems. Please check with Microsoft to see if there is a service pack that you should apply to Visual Studio or Office in order to get support for the version of SQL Server to which you are connected. You can continue but any new object types might not be enumerated, and it will not be possible to save any objects or database diagrams that you create using the Visual Database Tools.

Any assistance would be GREATLY appreciated. I'm stuck and wish I could make this happen.

PS:....

The version of Access 2003 specifically is: Microsoft ? Office Access 2003 (11.6566.6568) SP2

I've even made two linked tables to the 2005 server and executed each view by themselves and it worked fine. However, if I try to create a query off of those linked tables, same errors just posted above.

I'm afraid that Access ADPs aren't going to work all that smoothly with SQL Server 2005--they are created for SQL Server 2000 and earlier. If you're creating a new app, it's recommended that you use an mdb with linked tables because it gives you more flexibility. ADPs were designed around the scenario that you would connect to *one* SQL Server database, not multiple databases. One option if you must use ADPs is to create views to access data in another database. You can then use those views in your Access FE.

--Mary

sql

Monday, March 19, 2012

Access 2000 connection failing to SQL Server2000

Hi guys,
I have an Access .adp project which is connecting to a SQL Server 2000 database. I am using Windows NT authentication.
When I open my access project I get an error message indicating that the stored procedure called from my start up form could not be executed. The problem is that the connection does not appear to have created.
In the main menu I click File and select Connection
The server is correctly selected in the drop down list on the pop up screen.
I click on 'Test Connection' and the I get a message indicating success. Now my project is connected and I can continue through the other forms and reports, executing stored procedures and getting records in my reports.
Any ideas on why the project is not connecting on start up, and why simply testing the connection appears to resolve the problem?
Has it something to do with DNS?First of what is the SP level on SQL server and what is the exact error message?

Accesing the SQL Server 2005

Hi,

I have a asp.net 2.0 web applicaiton which is connecting to the remote SQL server 2005. When I run the Web app, then Iam connecting to the DB and its displaying the records on the page.

When I browse the same page from the IIS, then iam getting the following error:

"System.Data.SqlClient.SqlException: Login failed for user 'mydomain\user' "

Connection string :

connectionString="Data Source=MySystem;Initial Catalog=DBLive;Integrated Security=SSPI;" providerName="System.Data.SqlClient"/>

Please let me know if find accross a solution for this...

Thanks

Vaskam

Verify the 'user' assigned to the Web Servers' AppDomain.

Somewhere, you seem to have assigned the security to 'mydomain\user' -I hope that your domain is NOT called 'mydomain' and that you do NOT have a user named 'user'.

Thursday, March 8, 2012

Absolutely no luck connecting

Hello all.
I have one laptop and one workstation.
Both are running:
- Windows XP Professional SP2
- Microsoft SQL Server 2005 SP2 (SQLServer2005SP2-KB921896-x86-ENU)
- No Domain. Workgroup configuration. Same username and password on
both systems.
- Each SQL instance is named.
- TCP and NP remote connections enabled via Surface Area Configuration
Tool.
- SQL Server Browser Service is running.
- No firewall, Windows or otherwise on either machine.
- File and Print Sharing are working normally between machines.
- Windows NT and SQL Server events logs are error-free.
- NETSTAT -aod shows SQL Server Browser listening on Port 1434 (UDP).
- SQL Server Service configured to use dynamic port numbers.
Using SQL Server Managment Studio to connect from one machine to the
other, e.g. Laptop to Workstation, Workstation to Laptop.
In all cases, Error Message is:
TITLE: Connect to Server
--
Cannot connect to DELL-D800\SQL2K5.
--
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: SQL Network Interfaces, error: 26 - Error
Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
For help, click: http://go.microsoft.com/fwlink?Prod...-1&LinkId=20476
--
BUTTONS:
OK
--
I've tried Instance names, IP/Port combinations, e.g.
192.168.13.8,1080, Windows Authentication, SQL Server Authentication;
nothing works.
Anyone have any ideas?More info:
- Instances are not hidden.
- DNS resolves names completely. No other TCP/IP-related errors.
- Local connections are working.
Thanks all.

Absolutely no luck connecting

Hello all.
I have one laptop and one workstation.
Both are running:
- Windows XP Professional SP2
- Microsoft SQL Server 2005 SP2 (SQLServer2005SP2-KB921896-x86-ENU)
- No Domain. Workgroup configuration. Same username and password on
both systems.
- Each SQL instance is named.
- TCP and NP remote connections enabled via Surface Area Configuration
Tool.
- SQL Server Browser Service is running.
- No firewall, Windows or otherwise on either machine.
- File and Print Sharing are working normally between machines.
- Windows NT and SQL Server events logs are error-free.
- NETSTAT -aod shows SQL Server Browser listening on Port 1434 (UDP).
- SQL Server Service configured to use dynamic port numbers.
Using SQL Server Managment Studio to connect from one machine to the
other, e.g. Laptop to Workstation, Workstation to Laptop.
In all cases, Error Message is:
TITLE: Connect to Server
Cannot connect to DELL-D800\SQL2K5.
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: SQL Network Interfaces, error: 26 - Error
Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
For help, click: [url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLS erver&EvtID=-1&LinkId=20476[/url]
BUTTONS:
OK
I've tried Instance names, IP/Port combinations, e.g.
192.168.13.8,1080, Windows Authentication, SQL Server Authentication;
nothing works.
Anyone have any ideas?
More info:
- Instances are not hidden.
- DNS resolves names completely. No other TCP/IP-related errors.
- Local connections are working.
Thanks all.
|||I am having the same problem connecting to a Vista Machine running SQL Express 2005 SP2 from an XP laptop. Like you, I have checked all the configuration settings and they seem correct. Remote connections are enabled.
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com

Thursday, February 16, 2012

About PlatformNotSupportedException in WM 5.0 with SQL Server

Hi All, I am now trying to develop an application connecting to a remote SQL server in a PDA with Windows Mobile 5.0 in Visual Studio.

I have installed SDK for WM5.0 for the development.

But I got the following Exception

System.PlatformNotSupportedException was unhandled
Message="PlatformNotSupportedException"
StackTrace:
at System.Globalization.CultureInfo..ctor()
at System.Globalization.CultureInfo..ctor()
at System.Data.SqlClient.TdsParser.GetCodePage()
at System.Data.SqlClient.TdsParser.ProcessEnvChange()
at System.Data.SqlClient.TdsParser.Run()
at System.Data.SqlClient.TdsParser.Run()
at System.Data.SqlClient.SqlInternalConnection.Login()
at System.Data.SqlClient.SqlInternalConnection.OpenAndLogin()
at System.Data.SqlClient.SqlInternalConnection..ctor()
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen()
at System.Data.Common.DbDataAdapter.FillInternal()
at System.Data.Common.DbDataAdapter.Fill()
at System.Data.Common.DbDataAdapter.Fill()
at DeviceApplication1.rfidcpsDataSetTableAdapters.VehicleTableAdapter.Fill()
at DeviceApplication1.Form1.Form1_Load()
at System.Windows.Forms.Form.OnLoad()
at System.Windows.Forms.Form._SetVisibleNotify()
at System.Windows.Forms.Control.set_Visible()
at System.Windows.Forms.Application.Run()
at DeviceApplication1.Form1.Main()

I just cannot figure what's the problem. Please help me! Thanks a lot!

That means you're trying to use locale which is not supported on your device (or emulator). With SQL Client it happens if your database has collation which is not available on device.

How to fix it:

1. Get device/emulator which supports collation you're using in your database (best way to go). Usually that would be device localized in particular language.

2. Purchase and install localization package on to your device. Note: some of these packages are do not provide complete localization required by NETCF and might not work, so test before you buy.

3. Change database collation to whatever is supported on your device. This one has consequences of potentially incorrect sorting, etc. Please refer to SQL Server documentation for collation impact.

|||

Thanks. Actually my database is just in English and no other language.

So I go for changing database collation. But in the Option, I don't know which one is supported in my PDA (Dell Axim X51v). In the PDA with WM 5.0, the regional setting is to English(United States). In th SQL Server Database collation, it was set to Chinese_Hong_Kong_Stroke_90_CI_AI_WS.

Can you tell me which collation I should set to as well as the locale setting in the PDA?

Thanks a lots!

|||

If your device is in English then I would guess something like SQL_Latin1_General* in it would do.

|||

I tried to change the database collation to "SQL_Latin1_General_CP1_CI_AI", with PDA setting to English(United States), but the same error came out!

Here comes my code and error

Dim sqlConnection1 As New SqlConnection("Data Source=BILLY\SQLEXPRESS;Initial Catalog=rfidcps;Persist Security Info=True;User ID=*****; Password=****;")

Dim cmd As New SqlCommand

Dim reader As SqlDataReader

cmd.CommandText = "SELECT * FROM Vehicle WHERE MainTagID = '123''"

Dim i As Integer = 0

cmd.CommandType = CommandType.Text

cmd.Connection = sqlConnection1

sqlConnection1.Open()

reader = cmd.ExecuteReader()

--

ERROR

System.PlatformNotSupportedException was unhandled
Message="PlatformNotSupportedException"
StackTrace:
at System.Globalization.CultureInfo..ctor()
at System.Globalization.CultureInfo..ctor()
at System.Data.SqlClient.TdsParser.GetCodePage()
at System.Data.SqlClient.TdsParser.ProcessMetaData()
at System.Data.SqlClient.TdsParser.Run()
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.ExecuteReader()
at System.Data.SqlClient.SqlCommand.ExecuteReader()
at RFIDApp.Form1.Form1_Load()
at System.Windows.Forms.Form.OnLoad()
at System.Windows.Forms.Form._SetVisibleNotify()
at System.Windows.Forms.Control.set_Visible()
at System.Windows.Forms.Application.Run()
at RFIDApp.Form1.Main()

Can any one help me?

|||

Use debugger to see which locale/LCID it's trying to use. Try another collation.

I'm also quite surprised you can even connect to the server - named instances do not work with devices because there's no support for named pipes. Are you running another SQL Server by any chance? Since you obviously can connect I would suspect this connection is made to the wrong server and you're changing collations not on the database you're connecting to. See this for more info on SQL Express connections from NETCF.

|||

"Use debugger to see which locale/LCID it's trying to use."

-> How can I check it?

Actually I did try to use the emulator to run but I failed to run and showed some error. So I stopped to carry on.

Ha, I don't know why, but, I can sure that my computer has only one instance of SQL Server (SQL Server Express Edition). So, the collation setting is the right one I used.

Any other advice? Thanks a lot!

|||

In the Debug/Exceptions... menu check the "Thrown" box for CLR exception. Run to the right exception and look at call stack window, you'll see something like this on the top:

mscorlib.dll!System.Globalization.CultureTableRecord.GetCultureTableRecord(int cultureId = 4556, bool useUserOverride = true) + 0x3c bytes

First number is a culture ID it's trying to get, should be 1033 for ENU. It would be something else in your case, look up which culture is that on MSDN.

Have you tried localized emulator, e.g. in CHT?

Try following the tutorial. Try changing collation for entire SQL Server Express.

|||

Thanks. I've used your method to check the cultureID. The conclusion is that it is set to 0xC04 Chinese (Hong Kong SAR, PRC)

I think it is the problem!! But how can I really change it to other value? How to chang this ID to ENGLISH?

Thanks a lot for your help!

|||

You already know that – you need to change database collation. It’s pretty clear what your attempt to change it has failed and you’re still using Chinese_Hong_Kong_Stroke_90_CI_AI_WS so client if forced to create matching locale (Chinese (Hong Kong SAR, PRC)) which is failing because your device does not support it.

I don’t know why it did not work, I would suggest asking in SQL Express forum. Perhaps SQL Express only allows one collation per server or something…

Also try creating brand new database with some ENU collation, see if that works.

|||

Yes, I finally understand the problem.

But what makes trouble is that I DID reinstall the SQL server express for changing the collation at server-level to Latin1_General_CI_AI,

Also, I DID change the database collation to Latin1_General_CI_AI as well! But how come from the debugger, the locale is Chinese (Hong Kong SAR, PRC)!!!!!!!

I have double-checked the setting in SQL Server Managment Studio Express! I tried to restart my computer as well but there's no change!!

Feel so lost!

|||I'm with Ilya on this one, please post this question in the SQL Server forum|||Thanks all of you. Hope someone could help me. :)