I am really new in C# Programming witf h Database. My problem is:
I have a SQL Database (in an other country) and My Application has to connect it for data transfer. How can I do that? Which alternatives do i have. Should I use a Web Service?
HI!I have a ASPNETDB as my login databas. but now i want to connect this databas or the aspnet_user table to my table, how do i?I want to check the username in aspnet_user table and select the same username in my table?I want to write all sql code in a sql file. so i want to know how i can connect to the sql file from my c# code?I hope somebody understand me...
Im trying to follow the Introduction to Visual Basic 2008 Express Edition video but when i come to the part whith test the connection to Northwind.sdf i get the following error
Access to the databas file is not allowed.[File name = C:Program Files (x86)Microsoft SQL Server Compact Editionv3.5SamplesNorthwind.sdf]
Is this at Vista 64 problem, the girl in the video is not using Vista and there it works fine.
Hi! I have created i webpage whos has a logged in system which is cretead in VS 2005 with the function ASP.NET configuration. And know will i move all databas to i a MSSQL 2000 there i only can have one databas, And know i have ASP.NET logged in Databas and one site databas. I just wondering if its possible to make i virtual connection with MSSQL 2000? If not somebody has some idés for me?
Dear All, i've one database replicated from production server. now i need to change one perticular table column datatype. what steps i need to follow to do this?
thankyou very much
Arnav Even you learn 1%, Learn it with 100% confidence.
Hi, I'm planning to develop a project on .NET using Sql server 2005. Just stuck at a point where I need to decide that Should I use 2 or 3 huge databases with a lot of tables and data into it or should i create a lot of databases which would contain small chunks of data. Please let me know which option would give me a better performance. Thanks in advance
God is great. We are not God. But we still can be great.
I designed the AlwaysOn wrong, but every time we fail over from primary server to another server, my applications cannot connect because the sql logins cannot connect to their default databases. Once I run the command to link the login with the user in the default database then the users are able to connect. Did I do something wrong when designing AlwaysOn?
I try to import my SSIS packages which are created using the Business Intelligent studio into SQL server 2005 but I cannot do that.
I am running SQL server 2005 enterprise edition.
Also when i tried to connect to Integration services using Object explorer, it only prompt me for server name. I cannot change the username and password which is disabled.
Then how am i supposed to connect to Integration services on a server in this case?
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" />.
Hi, I am a beginner in asp.net so sorry for my question .. I want to make the event for the button when clicked , inside this event I will be transfer the value of dropdownlist into the DB by use ( WHERE ) condition .. My question is : - how I write the connection to the DB ?? is this a connection statement in the web.config ?? or what ?? because it generate an error by this code.. SqlConnection sqlConnection1 = new System.Data.SqlClient.SqlConnection("Data Source=-SQLEXPRESS;Initial Catalog=2C2Mdb;Integrated Security=True"); SqlCommand cmd = new SqlCommand();cmd.CommandType = System.Data.CommandType.Text;cmd.CommandText = "INSERT Meeting (mSessionNO) VALUES (" + DropDownList2.selectedvalue + ") WHERE [HijriYear]=" + DropDownList1.SelectedValue ; cmd.Connection = sqlConnection1; sqlConnection1.Open(); cmd.ExecuteNonQuery (); sqlConnection1.Close();
HI, May i know which is fastest and best way to connect sql with asp.net.I mean web.config appsetting or creat a class.vb throught public shared. Thanks with best regards,
I have atlast installed SQL Server 2005 on Vista. However, when I try to connect using Database Engine as Server type, I get this message:===================================Cannot connect to MY-MACHINE-NAME.===================================Login failed for user 'My-Machine-NameUsername'. (.Net SqlClient Data Provider)------------------------------For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476------------------------------Server Name: MY-MACHINE-NAMEError Number: 18456Severity: 14State: 1Line Number: 65536
I have created DSN connection for sql server database. Now How do I connect to database through code and open the table for retriving and saving records?
I need help on SQL Server 7.0 on connection to the server. The error message is "General Network error, Check your network documentation, ConnectionOpen(Connect)" when I try to add SQL server registration.
I was able to the server but occasionally I couldn't able to connect to the server. Does anyone knows what I should do to fix the problem?
When trying to connect to SQL Ent. Mgr., got an error message:
A connection could not be established to [servername] - cannot open user default database '<ID>'. Using master database instead. Please verify SQL Server is running and check your SQL Server registration properties...
I have not seen this message before. There is one server and 4 PCs. All worked fine before. Now one PC connects, three - don't. Did not see anything unusual with the registration properties; All users show in [servername]/security/logins. Did not notice anything relevant in the "DBA survival guide".
Hi there, We just upgraded our webserver from NT4 to W2K and I now cannot connect from my desktop SQL Server client to the new SQL Server 200 in order to export data to the new database. I just get the error "timeout expired". What things should I be looking at to resolve this problem?
I am trying to connect to a SQL Server 2000 database using VBScript on an active server page, but I can't connect. I think my SQL Server may be set up wrong in the security settings.
I have my authenication set to Windows Authenication Only, and I have an "sa" account with a password.
Here is my code:
Code:
<% dim objConn dim sqlCmd dim FromWebPage as string FromWebPage = "FromWebPage"
'connect to the SQL Server db (local machine) objConn.ConnectionString = "PROVIDER=MSDASQL;DRIVER={SQL Server};SERVER=(local);DATABASE=SteelBoard;UID=sa;PWD=password;" objConn.Open
Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified /TheResort/i_asputils.asp, line 8
Problem:
I setup the ODBC portion and it correctly saw the MS SQL server, and the test connection worked fine. Yet when I ever I enter that ODBC name "Test_Server", and the password of the Win XP Pro user I am signed in as, it fails to connect.
How can I be sure what domain,user,password I need to enter?
Hi Group, I get the following error when I try to connect to SQL Server 7.0 (Beta Version) from my ASP page. I'm using this for testing purposes.
Error Type: Microsoft OLE DB Provider for SQL Server (0x80004005) [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. /CheckLogin.asp, line 27
Line 27 in CheckLogin.asp is:objConn.Open strSecurity Here is my connection string: strSecurity = "DSN=Operations" This is in an .inc file.
Am I missing something? I've tested the DSN connection and it is OK. I am using TCP/IP as opposed to named pipes.
Hi, I have installed The SQL server 2000 on my local computer without being connected to the server.I have a visual basic form and I want it to be connected to my SQL server database(which is in my local computer). What's the code that enables me to connect my visual basic form to my SQL database? Thanks in advance
HiI'm trying to connect to a MS SQL Server using ASP.NET / C#. I'vealready got some VB code that works but I'm unable to translate it toworking C# code. Can anyone help me out?Working VB code:Dim ConnConn = CreateObject("ADODB.Connection")Const ConnectionString = "DSN=dsn_name;database=database_name"Conn.Open(ConnectionString, "user_name", "password")Not working C# code:string ConnectionString = "Initial Catalog=database_name;" +"Data Source=dsn_name;" +"User ID=user_name;" +"Password=password;" +"Integrated Security=SSPI;";SqlConnection Connection = new SqlConnection(ConnectionString);Connection.Open();Connection.Close();
HiMy colleague has set up MSDE on his machine. I am only able to connectto his machine via IP and not servernameWhy is this? I want to use ACCESS as a fornt end and can't useing IPaddressJerry
Win 2000, sqlServer 2000 Personal editionTrying ot connect using .asp Vb Script1. Sql server set to use Windows Authentication2. Log onto Windows 2000 as Jim Bunton {no password)3 Server 'Study' running ok4. sql query analyseri. "SELECT User_Name > dboii. [using database NorthWind]"SELECT * FROM Customers" > gives expected result5. VB script** BEGIN CODE connect.asp ***<%@ LANGUAGE="VBSCRIPT"%><%Option explicitresponse.expires = 0%><!-- #include file="adovbs.inc" --><html><head><title></title></head><body><%dim Cn, CnStrSet Cn = Server.CreateObject("ADODB.Connection")Cn.ConnectionTimeOut = 1Cn.provider="sqloledb"response.write "Conn Provider is " & Cn.providerCnStr="Data Source=Study;Initial Catalog=Norhwind;UserId=sa;Password=;"' Tried all sorts of user id's and paswords'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id ='Jim Bunton';Password=;"'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id=dbo;Password=;"'CnStr="Data Source=Study;Initial Catalog=Norhwind;User Id =JimBunton;Password=;"'CnStr="Data Source='Study';Initial Catalogue='Norhwind';User Id='StudyJim Bunton';Password=;"%><p>----------</p><%response.write "Cnstr = " & CnStr'ERROR ALWAYS OCCURS ON NEXT LINECn.open CnStr'Error Type:'(0x80004005)'Unspecified error'/myweb/mywebs/connect.asp, line 35%><p>----------</p><%response.write "The End - ran ok"%></body></html>**** END CODE *****? what to do???? am I missing something 'obvious' out ???--Jim Bunton
When i am trying to create a new database project in VSTE DB Prof and say finish an error is thrown saying "WHEN CONNECTING TO SQL SERVER2005, THIS FAILURE MAY BE CAUSED BY THE FACT THAT UNDER THE DEFAULT SETTINGS SQL SERVER DOES NOT ALLOW REMOTE CONNECTION". I have checked all services and started all the required ones.I am also using a local connection, i am trying to connect to the database on my system.How to handel this error?