General Connection To SQL Server... Done... Grids And Data Retrival ...ugghhh
Dec 13, 2005
Help!!! please!!!... I'm pulling my hair off... Having an external hosting for sql server is terrible for .net. Too many restrictions and they are not willing to help at all... I cannot connect directly, I have to do everything using strings. Honestly and it's a shame to admit it I never learned how to connect using strings, only using the wizard (upsizing DBs from Access to SQL Server)finally, after a month of trying I was able to connect to the database using a string like this:
Dim CS As String
Dim db_name, db_username, db_userpassword As String
Dim db_server As String
db_server = "blah,blah,secureserver.net" /yes, with them >:(
db_name = "DB##"
db_username = "***"
db_userpassword = "***"
Me.SqlConnection1.ConnectionString = "SERVER=" & db_server & ";DATABASE=" & db_name & ";UID=" & db_username & ";PWD=" & db_userpassword
I am probably not using it right but it's working to capture info using stored procedures but I've been trying to get my datagrids to connect and they are impossible... Any ideas? what would be the coding part of the datagrid/dataset/etc... connection? That probably means that I can't use the property builder or the dataset generator, right? Any ideas ? Thanks
(using 1.1 Framework)
View 1 Replies
ADVERTISEMENT
Nov 5, 2006
Hy everyone,
I have a problem at pulling data on PDA using Sql Mobile 5 from Sql Server 2000.
It work s for most tables, except for two . Every table of those two has about 1000 records and every record about 150 bytes, so all data is about 150 kbytes.
When I connect to the Sql Server 2000 through LAN, no problem. But when I connect through GPRS - VPN, the error occurs. But, the PDA- phone connection is via Bluetooth and at ping no TimeOut appears, the replies are about 600-700 ms. When connecting with a desktop computer through GPRS no such problem occurs.
So , I don't know what could be the cause: the connection or the Sql Mobile which doesn't retry enough in case of error to transfer all data .
A specialist from the GPRS provider told me to use 3G phone , but , because the GPRS phones have already been bought, this would be a too big investment. So, I don't think this is a good idea in this moment .
I found similar problem on the net and a solution was to use Pooling = False. But , in Sql Mobile there is no pulling parameter available when making the connection string .
Any help is very precious to me ,
Mihai .
View 10 Replies
View Related
Apr 16, 2008
Could someone give me the general syntax to pull xml data from a web server that I have access to? I do know that I can not use an ip address, I have to use the hostname, etc.
I was using something like
FROM OPENROWSET(BULK '\SERVERNAMESHAREPATHDATAFILE.XML', SINGLE_BLOB) as x
instead of using SERVERNAME I am user http:\www.mycompanyname.commycompanynamestoredata.xml
I do not understand why this does not work. I hope I gave enough information for this.
Please help.
Thank you
LadyDee
View 10 Replies
View Related
Nov 18, 2006
Hi
I am just starting to learn how to use data mining with SQL server 2005. I have some general questions which I hope someone out there can help me with.
Each month I have approx. 100.000 customers who buy a product.
I want to contact 10.000 of these with a letter for cross-selling some additional products.
Currently I choose these 10.000 randomly from the 100.000 customers. I now want to use SQL server 2005 data mining to choose these 10.000 better, to receive a better response rate. How do I transfer this knowledge to the 100.000 (potential cross-selling customers)
I understand that it could be set up in SQL server like the following:
case table: customer_id, gender, age, city, etc.
nested table: customer_id, product
Is this the way it should be approached and is there a special model/algorithm for this purpose?
Regards,
Dennis
View 5 Replies
View Related
Nov 26, 2006
We have a SQL 2005
clustered server (Microsoft Cluster Services) that is queried from 4 IIS6
Windows Server 2003 frontends. Each frontend runs both classic ASP apps
connection with SQL Server ODBC and .NET2 apps connecting with
System.Data.SqlClient. Ocassionaly we get a string of errors/timeouts opening a
connection lasting maybe 2 minutes.
One the classic ASP
apps we log one of these two errors:
Microsoft OLE DB Provider for ODBC
Drivers (0x80004005)
[Microsoft][ODBC SQL Server
Driver][DBNETLIB]General network error. Check your network
documentation
or
Microsoft OLE DB Provider for
ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server
Driver]Timeout expired
on the
ADODB.Connection.Open
On the .NET2 apps we
log
Message Timeout expired. The timeout
period elapsed prior to completion of the operation or the server is not
responding.
StackTrace at
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject)
at
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
at
System.Data.SqlClient.SqlConnection.Open()
at
System.Web.SessionState.SqlSessionStateStore.SqlStateConnection..ctor(SqlPartitionInfo
sqlPartitionInfo)
Source .Net SqlClient Data Provider
Any ideas for further debugging?
View 11 Replies
View Related
Sep 4, 2001
Hi!
I have stored prosedure with only one parameter - date to retrive data by datetime column (that includes date and time (h:min:sec) portions).
This query doesn't work when I try to select using LIKE operator
by date portion
select * from <table>
where <datecolumn> LIKE '20011206%'
BOL says:
It is recommended that LIKE be used when you search for datetime values,
because datetime entries can contain a variety of dateparts. For example,
if
you insert the value 19981231 9:20 into a column named arrival_time, the
clause WHERE arrival_time = 9:20 cannot find an exact match for the 9:20
string because SQL Server converts it to Jan 1, 1900 9:20AM.
A match is found, however, by the clause WHERE arrival_time LIKE '%9:20%'.
WHAT should I do?
Thank you,
Elena.
View 2 Replies
View Related
Nov 13, 2001
I am connecting a access database to SQL Server and lately I have been getting this error every once in a while. Any idea why?
View 1 Replies
View Related
Nov 17, 2000
I have a table...say tb1 of 20 columns which has 2.7 million rows. There is no PK and the only way of identifying a unique row can be done with combination of column1+column2+column3.
Can anyone help me how to idetify the duplicate rows and also delete the duplicate rows. And to commit after every 5000 rows.
ITS VERY URGENT....Thanks in advance.
View 8 Replies
View Related
Aug 9, 2006
Rajesh writes "Hi
I have a table. I need to see the newly inserted row on the day. i.e. newly inserted data alone. I dont have any date field in the table."
View 9 Replies
View Related
Sep 16, 2015
One of my report has different data types like decimal,percentage and integer values.
When I exported the report to excel , all the values are showing as "general" data type.
How to get excel data type same as ssrs report data type by default when exported to excel?
View 2 Replies
View Related
Oct 15, 2007
Hi All,
This is first time I am trying to ste timeout on SSIS package ,Can some one let me know which is the best way to set timeout for connection?
And what is the difference between General TimeOut and Command TimeOut?
Thanks,
Shilpa
View 4 Replies
View Related
Sep 24, 2006
I asked my tutor those questions and I want to ask you too
Hi
Sir
I hope you doing fine
I
have some questions please;
What is the diffrent between For Attach in Create Database
Command and Sp_Attach_DBWhat is the diffrent between store db file in folder and store
it raw partition e.g. C:What is the useful from TextImage_On in Create Table Command; it
is order Sql Server to stor the photo in diffrent table's fileCan you give us a basic steps to insert *.JPG photo in Sql
ServerIf I have this statement:
Create Table xTable
(
UserId
Int ,
UserName
VarChar ( 3 ) ,
Email
VarChar ( 10 ) Default ( UserId + '_' + UserName )
)
Why This Code not works and how can
I do this without using Triggers.
Can you tell us the different between Media Set and Media Family
and the useful of them. Can we do Backup and Restore Commands on Virtual Tape and How?When I write this code
Create Trigger xTrig on xTable
For Insert
AS
When this trigger will fire Before
Insert, during or after.
What is the useful from EDURE in Create ProcedureWhat is the useful from Recompile in Create Procedure In Sp_AddRole how can I create this role and make the owner
anther person e.g. sa What is the different between User and LogIn in Sql ServerWhat is the different between Role and Group in Sql ServerWhy can I add user to group in Sp_AddUser and I could not add
one in Sp_AddLogin
These lies work good
-- Add
New LogIn to ProgramManagerRole
Exec Sp_AddLogIn 'zProgramManagerUser' , '' ,
'C8_Ahmad_13430_NewSIS' , 'English'
Go
Exec Sp_GrantdbAccess 'zProgramManagerUser'
Go
Exec Sp_AddRoleMember 'ProgramManagerRole' ,
'zProgramManagerUser'
Go
But Why these lines not work good and give me a
msg with an error the Role name or User Name not in the db
-- Add
New LogIn to ProgramManagerRole
Exec Sp_AddLogIn 'zProgramManagerUser' , '' ,
'C8_Ahmad_13430_NewSIS' , 'English'
Go
Exec Sp_AddRoleMember 'ProgramManagerRole' ,
'zProgramManagerUser'
Go
Exec Sp_GrantdbAccess 'zProgramManagerUser'
Go
Thank you
View 3 Replies
View Related
Jan 26, 2005
Is there a way to tell who the guilty person is:
The process winlogon.exe has initiated the shutdown of computer DOCSITE01FDK on behalf of user NT AUTHORITYSYSTEM for the following reason: Application: Maintenance (Planned)
Reason Code: 0x84040001
Shutdown Type: shutdown
Comment:
It tell you that the source is user23. Is there a way to determine who shut down this server?
Thanks
View 4 Replies
View Related
Jan 8, 2007
Ananth writes "A new feature is established in SQL Server 2005. That is Partitioned Table. I went through several articles in net regarding partioned table. But I did not get any generalized version of Partitioning.
For example I partitioned a table into 4 Filegroups based on Transaction Date. So I used range function to give ranges for 4 quarters of one year. It works fine. But I would like to generalize this scenario. It will work for one year. If new year comes ,I have to write new script and execute the same.
The Partitioned function should work for 12 months in a given year. So here year is the paramter and then that function should be construct based on the year automatically.
Can anybody give me answer asap."
View 1 Replies
View Related
Oct 3, 2006
Does SQL Server 2000 sp4 work with IPv6?
View 1 Replies
View Related
Mar 10, 2007
Hello everyone, this post will be a bit lengthy, so please bear with me. I've been programming asp.net for abou 2 years. I'm not a master by any means, and I do things like I learn from books. Here is my standard way of connection to my mssql database (which is on the same server as my site, so I just use "localhost") Dim objConnection As New SqlConnection(Application("dbstring"))
Dim strSQL As String = "SELECT * FROM myTable WHERE this='that'"
Dim objCommand As New SqlCommand(strSQL, objConnection)
Dim objDataReader As SqlDataReader
objConnection.Open()
objDataReader = objCommand.ExecuteReader()
Do While objDataReader.Read() = True
'Do what I need to do with the data
Loop
objDataReader.Close()
objConnection.Close()
objConnection.Dispose()Here's my issue. Our website gets this error 2-4 and as many as 6 or 7 times a day: General network error. Check your network documentation.Line ###: objConnection.Open()I use the method I wrote above for getting data on almost every page in the site. Its a HUGE site, but I've made sure that I close all my connections. This is my global connection string: Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) Application("dbstring") = "Server=WWW1;database=###;uid=#####;password=#####;Connect Timeout=300;Connection Reset=False;Pooling=False;Max Pool Size=75000;" End Sub Here's my web.config file:<configuration> <system.web> <customErrors mode="Off"/> </system.web></configuration>... This server has only one website running on it, its a dedicated server. Is there something in my code causing this error to happen so much? We have to restart the sql server everytime this error happens for it to go away. Its very disruptive to the website.
View 8 Replies
View Related
Feb 22, 2004
Hi All,
Great forum y'all have going here.
Just wondering if anyone else has experienced this?
Enterprise Manager:
I have setup and 'sucessfully tested a MAPI session' with a mail profile via support services > sql mail. That works fine, however in sql server agent properties the mail session section on the first general tab appears to be greyed out.
scenario is:
Windows Server 2003 SBS edition
SQL Server 2000 SP3
Exchange Server 2003 is also running on the server, with Outlook 2003 client (so i suspect side chaining issue).
Any help appreciated! did not have any luck googling or using microsoft KB.
View 12 Replies
View Related
Dec 19, 2005
Hi,When I click on the properties of a linked server, all the Generalproperties are read - only, which means that if I want to edit anygeneral properties I have to delete the linked server and recreate it.Needless to say this is a pain. Is this by design or some kind of bug?Is there a workaround?Thanks
View 8 Replies
View Related
Apr 5, 2006
Hello,
I want to know the following:
- When will SQL 2005 Express Management tool be out of CTP and be in production?
- When will SQL 2005 Express SP1 be out of CTP and be in production?
Thank you,
Harry
View 1 Replies
View Related
Jun 9, 2006
hi siri have table hh .it has two columnsone is hhno is integer datatype another hhdoc is xml data type likehh tablehhno hhdoc---------------------------------------------------------------------------------------------100<suresh>sfjfjfjfjf</suresh>....................................101<ramesh>hhfhfhf</ramesh>..................................how to convert the xml data format into the general data format plshelp me with examples
View 1 Replies
View Related
Nov 15, 2006
I am working on two versions of an application, one of which will be awindows forms application (which will need to be redistributable) andthe other will be a web application.I have MS Visual Studio 2005 (along with the developer's edition of MSSQL Server), but not MS Access. I also have MySQL, PostgreSQL, Sun'sapplication server, Tomcat and Apache web server. I am working onWindows XP Pro, and have installed the .NET 3 SDK and all relevantrelated products I could find (e.g. 2 extensions packages for VisualStudio).I have one MS Access database, to which my users should have read onlyaccess. I have, and have used, a tool for importing MS Accessdatabases into MySQL. I expect that SQL Server has a similar utilityhidden somewhere (where I haven't yet looked, though I HAVE beenlooking - obviously in the wrong places). I have located a similarutility for importing MS Access databases into PostgreSQL. I have notyet decided which servers to use for the web version, but that isanother story, for which I may raise another thread in due course (butI welcome suggestions which may reduce the effort required givenrequired effort for the windows forms app).My problem is for the windows form aplication (intended for use by asingle family). I expect to use ADO.NET. The question is, should Iimport the Access database into MS SQL, and redistribute it, along withMS SQL Server Express (or is that necessary), or distribute it just asan Access database and use the jet engine to access it. A relatedquestion is, "Does ADO.NET support creating new databases for a givenengine?" Imagine a recipe database. It is easy enough to create a SQLscript that creates all the required tables, indices, foreign keys,&c., but can I submit that SQL script to an ADO.NET object, along witha file name, and have it create, e.g., an Access database with thesupplied name. Or do I have to create a database file with nothing init other than the schema?I have more questions, but they'll have to wait.ThanksTed
View 5 Replies
View Related
Aug 9, 2005
I have asp code that uses C# to create a SQL connection and a command. Then I create a data set and fill the data set using my comand. Finally I bind my data set to a data grid named myDataGrid. I am not sure where myDataGrid comes from since it is never defined. Where does myDataGrid come from? Also, I believe that I do not need to call page_Load since auto wire is set to true by default so it is my understanding that this method page_Load will be called by default.void page_load(object sender, EventArgs e) { SqlConnection myConnection = new SqlConnection("server='(local)'; trusted_connection=true; database='mattsDEMO'"); SqlDataAdapter myCommand = new SqlDataAdapter("select * from people", myConnection); DataSet ds = new DataSet(); myCommand.Fill(ds, "people"); MyDataGrid.DataSource=ds.Tables["people"].DefaultView; MyDataGrid.DataBind(); }
When I place a data grid controll on my page named myDataGrid, I do not see a data grid and there is no data either. The code in the HTML looks like this:
<body> <form runat="server"> <p> <asp:DataGrid id="myDataGrid" runat="server" BorderColor="Maroon"></asp:DataGrid> </p> </form></body>I tried using debug that comes with the .Net framework (since I am using Web Matrix) but I get an error saying no symbols were found for this document when setting break points. What are symbols and why do I need them?So, I basically have four (4) important questions that I need help answering: 1) Why do I not have any data in my data grid? 2) Where did myDataGrid come from? 3) Is the page_Load method called by default if auto wire is set to true or not declared? 4) Why do I need symbols for debug?Below is all my code in one complete view:<%@ Page Language="C#" %><%@ Register TagPrefix="wmx" Namespace="Microsoft.Matrix.Framework.Web.UI" Assembly="Microsoft.Matrix.Framework, Version=0.6.0.0, Culture=neutral, PublicKeyToken=6f763c9966660626" %><%@ import Namespace="System.Data" %><%@ import Namespace="System.Data.SqlClient" %><script runat="server">
// Insert page code here //
</script><html><head> <script language="C#">void page_load(object sender, EventArgs e){SqlConnection myConnection = new SqlConnection("server='(local)'; trusted_connection=true; database='mattsDEMO'");SqlDataAdapter myCommand = new SqlDataAdapter("select * from people", myConnection);
DataSet ds = new DataSet();myCommand.Fill(ds, "people");
MyDataGrid.DataSource=ds.Tables["people"].DefaultView;MyDataGrid.DataBind();}
</script></head><body> <form runat="server"> <p> </p> <p> <asp:Label id="Label1" runat="server">This is a test!</asp:Label> </p> <p> <asp:DataGrid id="myDataGrid" runat="server" BorderColor="Maroon"></asp:DataGrid> </p> </form></body></html>Thanks,Ryan
View 1 Replies
View Related
Apr 25, 2008
Well, what I want is to be able to do some tooling on a database (.sdf) on my WM5 device using C# Express 2008.
The problem is that when I select the "Tools/Connect to database" option, I choose my data source to be "Sql Server Compact 3.5" in the next screen, and when I press Continue, I am taken to the next screen, and here I cannot select the "ActiveSync connected device" in the "Data Source" section...it is disabled. The only option is selecting "My computer"...but I do not need that.
Is there something I need to install in order to activate that option?
Thanks,
Adrian
View 4 Replies
View Related
Feb 23, 2014
i am getting following error
Error 40 - Could not open a connection to SQL Server
View 4 Replies
View Related
Sep 16, 2015
I am using sqljdbc41.jar to connect with MSSQL database, it is working fine on my local machine.Where as on the remote server, same class giving me error
Login failed for user '<domain><windows loginID>'
My connection string is URL...
I am using sqljdbc41.jar and on 64 bit processor , I am using following command which included path for sqljdbc_auth.dll java -Djava.library.path= C: sqljdbc_4.1enuauthx64 TestDao and error is Login failed for user '<domain><windows loginID>' why it is not picking up username passed in connection string. I have 2 machines, one is local and other is remote. on both machine I login using my domain, it is working absolutely fine on local then why the error is coming on remote machine.Both the machines are identical.
View 4 Replies
View Related
Dec 5, 2007
I have Informix 9.4TC6 and SQL Server 2005.DB_LOCALE in Informix DB is en_US.utf8 (en_US.57372).First, I created DSN to Informix. Then tried to get data with WinSqltool and it works fine.But when I created linked server in SQL Server 2005 I have problemswith languages other than English.I get a string like:è 'å· åŒ-å|å·¥æ¥æ ªå1/4 ä1/4šç¤3/4It seems to me that SQL Server splits 2-byte characters in 2 1-bytecharacters.If in options of linked server we set Collation Name to exactlanguagewe want --then string data will be correct (of course only oflanguage that we choose).Do you have any suggestions?????????P.S. I don't want to use SSIS (DTS) for extraction from Informix DB
View 1 Replies
View Related
Mar 1, 2008
Hopefully there's an easy answer for this. I'm totally new to SQL server and I'm trying to upsize an Access database. Whether I use the upsizing wizard or try to create a data source through the ODBC Data Source Administrator, I get a connection failed error. It tells me the server does not exist or my login is incorrect. I'm using NT authentication to connect to the server on my local drive. I just installed the whole 2005 express edition and the only thing that came up during the install was that I didn't have IIS installed. I didn't see how that would be relevant, so I went ahead with the install.
Shouldn't this work with the default setup? I've searched around trying different "solutions" although I doubt they were specifically related to this very basic problem. I tried giving my login every right I could find through in the database engine properties in the server management studio, which connects fine itself with just my network login name and no password. What am I missing?
View 3 Replies
View Related
Jul 12, 2007
We just replaced an older Windows 2000 sp4 server with a new Window 2003 Standard Edition sp2 server to run our batch processing. We noticed that when the SQL command times out we now get the following error in the ADO command object error collection.
[DBNETLIB][ConnectionWrite (send()).] General network error. Check you network documentation.
Native Error: 11
SQL State: HY018
msado15.dll version 2.82.3959 is on this server.
On other servers running Windows 2003 Enterprise Edition sp1 the error on the ADO command object is normal with.
Timeout expired
Native Error: 0
SQL State: HYT00
msado15.dll version 2.82.1830 is on this server.
The SQL server they are talking to is on the other side of a firewall. It is SQL 2005 sp2 running on Windows 2000 sp4.
I have also tested this on a Windows 2003 sp2 server that doesn't have to cross a firewall and get the correct Timeout error. It also has the same version of msado15.dll as problem server.
The application is a collection of VB6 Components that are running in COM+ applications. I have isolated the test application to our one SQL interface component and have build a test vbs that can reproduce this on demand. The VB6 Components were not modified in any way for this change and have been working fine for many years prior to this.
All other aspects of our batch processing works as expected. Transactions are working fine. As long as the SQL doesn't timeout everything is normal. DTCPing was used to ensure both servers have correct ports open to allow DTC traffic. Checked the SynAttackProtect setting on SQL and this is not an issue since other clients have no problems.
One point I would like to add is that this new server was initially setup with a temporary server name and then was changed to use the name of the original server on move day. Don't know if this has any impact or not.
View 31 Replies
View Related
Mar 30, 2007
Hello,
I've created a SSIS Solution and have created Data Sources. I have two packages. One was created before the Data Sources, and one was created after. The package that was created after is using connections from the Data Sources. I want to change the package before the Data Soruces were created to use them, but when I right click in the Connection Managers pane "New Connection From Data Source.." is not an option.
Did I not add it to the Solution properly?
How do I get it to show?
Did I not refresh something?
Please provide the how if you figure it out.
Thanks
View 4 Replies
View Related
Apr 3, 2008
Hello
I have VS 05 professional connected to SQL server express. I am trying to make a simple console connection to northwind database to show the results of a simple procedure.
The code is as follows:
using System;
using System.Data;
using System.Data.SqlClient;namespace Chapter6
{
class CallSp1
{static void Main()
{
// create connection
SqlConnection conn = new SqlConnection(@"server = .centrinosqlexpress;
integrated security = true;
database = northwind");
try
{
// open connection
conn.Open();
// create command
SqlCommand cmd = conn.CreateCommand();// specify stored procedure to executecmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_select_employees_details";
// execute command
SqlDataReader rdr = cmd.ExecuteReader();
// process the result setwhile (rdr.Read())
{Console.WriteLine("{0} {1} {2}",rdr[0].ToString().PadRight(5),rdr[1].ToString(),rdr[2].ToString());
}
rdr.Close();
}catch (SqlException ex)
{Console.WriteLine(ex.ToString());
}
finally
{
conn.Close();
}
}
}
}
The build indicates no errors but the dos output gives the following error:
Error: System.Data.SqlClient.SqlException: 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 notallow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, BooleantrustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at Chapter10.ConnectionSql.Main(String[] args) in D:PROG_DEVVb.NET_devConsoleAppconnectVerifyAppconnectVerifyAppProgram.cs:line 18Connection closed.Press any key to continue . . .
BOTH THE CLENT AND DATABASE IS ON SAME MACHINE.
THE DATABSE IS centrinosqlexpress as shown in the code.
I
View 2 Replies
View Related
Nov 28, 2007
hello there! i have a problem importing data from a remote connection using Sybase ASE ODBC driver(the sybase odbc driver is the only way we can access the database from the remote connection, we've already tried this in crystal reports). in the sql server import export wizard i chose the .net framework data provider for odbc. then below the wizard requires the following info: the connection string, DSN and driver. i specified the correct driver and dsn. in the connection string i specified the user id and the server name but it still produces error. the error says:
the operation could not be completed.
additional information:
ERROR[01000][SYBASE][ODBC Sybase driver][Sybase]ct_connect(): user api layer: internal Client Library error: HAFAILOVER: Trying to connect to server.
ERROR[01000][SYBASE][ODBC Sybase driver][Sybase]ct_connect(): user api layer: internal Client Library error: HAFAILOVER: Trying to connect to server.
i need your help guys... thnx
View 2 Replies
View Related
Mar 27, 2008
Is it possible to connect to an Access database on my local drive, or does it have to an SQL database? Here is the error I am getting:
Server Error in ' 'Application.
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) Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code. Exception Details:
System.Data.SqlClient.SqlException: 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)Source Error:
Line 19: Dim ConString As String = ("Data Source=C:Inetpubwwwrootmessage.mdb")Line 20: Dim myDataAdapter As New SqlDataAdapter(SQLStatement.Text, ConString)Line 21: myDataAdapter.Fill(myDataSet, "tblMessage")Line 22: myDataGrid.DataSource = myDataSet.Tables("tblMessage")Line 23: myDataGrid.DataBind()
View 2 Replies
View Related
Oct 20, 2007
We've been using SQL Server 2005 for a while as the db for our web app. Everything has been working fine, until yesterday when we started getting a "Arithmetic operation resulted in an overflow. (System.Data)" error message when trying to connect from SQL Server Management Studio or from our web app. This only happens when trying to connect remotely, although remote connections have worked for us perfectly in the past. The full error message is reproduced below. Thanks ahead of time for any help. ===================================Cannot connect to serverName===================================Arithmetic operation resulted in an overflow. (System.Data)------------------------------Program Location: at System.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(Boolean encrypt, Boolean trustServerCert, Boolean& marsCapable) at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) 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.SqlClient.SqlConnection.Open() at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo ci, IServerType server) at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()
View 1 Replies
View Related