I'm trying to find a way to Databind a usercontrol to a datasource (an
ObjectDataSource in my case) like in the case below :
<uc1:AutoComplete ID="autoComCities" runat="server"
DataSourceID="objCitiesDS" DataValueField="Id" DataTextField="Name" />
oledbCon.ConnectionString = "Provider=MySqlProv; Data Source=localhost; Initial Catalog = AnymoreComputers; User id=WeakUser2;Password=1234";
my site is working and running wrote in c# and mssql 2005,
now i want to make it run with mysql.....i converted all my data base...and created the same users (same names)
anc copied all to my sql .
the question is how do i connect to mysql wit c# ......
my regular connection for mssql :
oledbCon.ConnectionString = "Provider = SQLOLEDB.1; DATA Source = (local); Initial Catalog = test1; Integrated Security = SSPI; User ID=WeakUser2;Password=1234"; the connection to mysql : oledbCon.ConnectionString = "Provider=MySqlProv; Data Source=localhost; Initial Catalog = test1; User id=WeakUser2;Password=1234";
this connection doesnt works ... where is my mistake ? what hsould i do ... ?
and this is the error ig get when i run my solution :"The ConnectionString property has not been initialized."
I'm new here and I'm in dire need of help. Been trying to solve a problem for hours now.Here's what I wanted to do: I added a table 'tblProductCat' in the webform and I intend to populate the table with VB codes as shown below
[Code]....
What am I doing wrong here? I really can't figure this out. There was a time when, instead of that exception handling message appearing, a yellow box that states something between the lines of 'offline' and 'check your root folder for *something*' or something like that.
I'm running SQL Express 2005 on an SBS 2003 Standard Server and I keep getting this error back.A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 28 - Server doesn't support requested protocol)
I've uploaded my project to this same server, and I've so far checked that TCP/IP has been enabled for this instance, I've checked the IPs are relevant, I've checked that the connection string is correct, and I've even set a dynamic port number as I've noticed that SBS runs 2005 databases for Sharepoint and Monitoring.
Interestingly enough, I can connect to this instance via Visual Studio on my remote machine, and SSMSE and also via SSMSE on the server as well?The connection string i'm running with is:
Data Source=localhostVDSSQL;Initial Catalog=myDB;Persist Security Info=True;User ID=SA;Password=***
i have been trying to connect to SQLserver from ASP.net web developer in an n-tier architecture.But it shows this error in conncetion
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
i try to make myGridView Companent via using WebPArt you know it :
using System.Web.UI.WebControls.WebParts; using System.Web.UI.WebControls; using System.Web.UI; namespace MyGridView { public class MyGridView : WebPart { GridView gv; protected override void CreateChildControls() { gv = new GridView(); gv.CssClass = "tablestyle"; this.Controls.Add(gv); } } }
i added this GridView on Toolbox. Every Thing is ok . İ want to add my own CSS design to my GridView. But if i drow this gridView from toolbox to aspx page. if i bind my datasource ; Datasource is not show himself.
Like that Main program:
protected void Page_Load(object sender, EventArgs e) { LoadData loaddata = new LoadData(); DataTable dt = loaddata.LoadSQL("conn", "sp_GetAllCategory"); MyGridView1.datas.... -----> i can not see DataSource why? }
i want to see My GridView DataSource. if i write Binding datasource. MyGridView1.DataSource -----> i can not see DataSource why?
I have use vs.net 2008 and sql erver 2008.When I wanna connect to sqlExpress in Sql Server Managment Studio 2008 this error is shown:Cannot connect to SAEID-PCSQLEXPRESS.A network-related or instance-specificerror occurred while establishing a connectionto SQL Server. The server was not found or was notaccessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error LocatingServer/Instance Specified) (.Net SqlClient Data Provider) In SqlServer Configuration Manager when I want start SqlExpress service an error is shown to me that cann't start the service.
I've created a SQL Server Express database to use with a program I'm working on in Visual Web Developer 2008. The connection works fine according to the Add connection-wizard in VWD. However there's a problem when I try to select data from the database and present the data in a gridview. The error message says that the gridview isn't connected to the database. The gridviews DataSource ID (source-mode) is the same as the name of the database. In design-mode, when I try try configure the datasource I get to a point where I have to configure the select statement, but I just want the connection to work in a way that let's me write the sql-statements in the aspx.cs-file.
I want to connect Sql server which is on remote mechine by IP adress. at present i able to connect sql sever which is on local machine using followning code:
SqlConnection con = new SqlConnection("Data Source=HCL-LAPTOP;Initial Catalog=databasename;User id=sa;Integrated Security=True");
I'd like to connect to a database on a different domain. I've done some search and people say to add a connectin using an enterprise manager? Where can I find sql enterprise manager? On msn website, they only show things about sql enterprise manager for sql 2000. Is this a tool only included in sql 2000?
I had a database on a development server of which I am not the owner. The connection string was:
Dim MM_cnnTraining_STRING MM_cnnTraining_STRING = "Provider=SQLOLEDB.1;Password=xxx;Persist Security Info=True;User ID=xxx;Initial Catalog=Training;Data Source=xxx"
I copied this database to my local machine, In services MSSQL is set to logon with my computer username and password, I have no idea if this affects anything.Also the local database which I can view in MSSQL Server Management Studio, I can connect by Windows Authentication only. The database copied there seems to have maintained the same permissions.Im completely confused. I finally was able to copy to my local machine but now can not connect. I am using dreamweaver, but using the connection string above.
i am tring to connect to my db in sql server 2005 :) and have some problem with it.the error that i get is : Keyword not supported: 'datasource'.the line that i have an error is :
I have been given a .NET type web hosting by my provider along with MSSQL. I am learing what that means and how to use it. Can I use my SQL Server 2008 Management Studio to connect to that SQL over the internet in order to put my database on the web? or how else can I use it?
what the ASP code is to connect to a domaincentral phpMyAdmin SQL database?They have zero online help or templates and their online help staff can't/won't assist.
I created a DSN entry and have tried various permutations of of the following:
Connection.Open "DSN=robinvi_mysql_dsn;"
including the driver, server (localhost) username and pwd strings but I still get: [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'localhost' (10061)
Also, what should the DSN entry contain? Currently it is: Server localhost (the default) Database robinvi_test Description Whatever... UID robin_michael PWD *** Port 3306 (the default) Option 16 (the default)