Connection Object To Client Ce
Mar 2, 2007
yo ce folks... Anyone had any trouble using a dataset for return values in a datagridview for the client app?
trying to make this work...
' Open the Connection For SQL Compact Edition
Dim cn As New SqlServerCe.SqlCeConnection("Data Source = " & Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "ffgsCRM.sdf")
Dim cmdProduct As SqlServerCe.SqlCeCommand
' create dataset with table
cn.Open()
cmdProduct = cn.CreateCommand
cmdProduct.CommandText = "SELECT ProductDesc AS Description, ProductCost AS Cost, ProductListPrice AS [List Price] FROM Product"
Dim daProduct As New SqlServerCe.SqlCeDataAdapter(cmdProduct)
Dim dtProduct As New Data.DataTable("Product")
daProduct.Fill(dtProduct)
Dim ds As New DataSet
ds.Tables.Add(dtProduct)
'' FILL DATAGRIDVIEW
Me.dbGridProducts.DataSource = ds
I have this working:
' search product description
Dim reqProductSearch As String
reqProductSearch = tstxtSearchDescription.Text
' Open the Connection For SQL Compact Edition
Dim _conn = New SqlCeConnection("Data Source = " & Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "ffgsCRM.sdf")
Dim cmd As New SqlCeCommand()
cmd.Connection = _conn
cmd.CommandText = "select ProductDesc as Description, ProductCost as Cost, ProductListPrice as [List Price] from Product where ProductDesc like '%" & reqProductSearch & "%' ORDER BY ProductDesc"
_conn.Open()
Dim resultSet As SqlCeResultSet
resultSet = cmd.ExecuteResultSet(ResultSetOptions.Scrollable Or ResultSetOptions.Updatable)
'' FILL DATAGRIDVIEW
dbGridProducts.DataSource = resultSet
With dbGridProducts
.Columns("Description").Width = 550
End With
Thanks,
Bill
View 4 Replies
ADVERTISEMENT
May 2, 2006
On Windows XP systems I get the following issue when trying to browse the MSDB folder in SSIS
Client unable to establish connection
Encryption not supported on SQL Server. (Microsoft SQL Native Client)
I have noticed another post where several others have noticed the same issue. It appears to only occur on Windows XP installations. Is there a workaround or fix for this?
View 2 Replies
View Related
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
Feb 18, 2007
Hi, I am deploying my web through a web hosting services which provides SQL database support. I got following errors whenever I try to open my webpage,which never happen when I run my web on the local machine. I have my connection string configured in my web.config as below:
<add name="ArtHouseConnection" connectionString="Server=serveripaddress; Integrated Security=True; Database=arteh3_database;User Id=username;Password=password;" providerName="System.Data.SqlClient"/>
<add name="ASPNETDBConnectionString1" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|ASPNETDB.MDF;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
This is the source code where error was generated:
public static class ArtHouseConfiguration
{
//cache connection string
private readonly static string dbConnectionString;
//cache data provider name
private readonly static string dbProviderName;
private readonly static string siteName;
//initialize constructor properties
static ArtHouseConfiguration()
{
dbConnectionString = ConfigurationManager.ConnectionStrings["ArtHouseConnection"].ConnectionString;
dbProviderName = ConfigurationManager.ConnectionStrings["ArtHouseConnection"].ProviderName;
siteName = ConfigurationManager.AppSettings["SiteName"];
}
and finally this is the error mg I got:
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.Source Error:
Line 30: static ArtHouseConfiguration()
Line 31: {
Line 32: dbConnectionString = ConfigurationManager.ConnectionStrings["ArtHouseConnection"].ConnectionString;
Line 33: dbProviderName = ConfigurationManager.ConnectionStrings["ArtHouseConnection"].ProviderName;
Line 34:
Source File: d:inetpubvhostsartehouse.orghttpdocsApp_CodeArtHouseConfiguration.cs Line: 32 Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
ArtHouseConfiguration..cctor() in d:inetpubvhostsartehouse.orghttpdocsApp_CodeArtHouseConfiguration.cs:32
[TypeInitializationException: The type initializer for 'ArtHouseConfiguration' threw an exception.]
ArtHouseConfiguration.get_EnableErrorLogEmail() in d:inetpubvhostsartehouse.orghttpdocsApp_CodeArtHouseConfiguration.cs:74
Utilities.LogError(Exception ex) in d:inetpubvhostsartehouse.orghttpdocsApp_CodeUtilities.cs:100
ASP.global_asax.Application_Error(Object sender, EventArgs e) in d:inetpubvhostsartehouse.orghttpdocsGlobal.asax:20
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.HttpApplication.RaiseOnError() +182
Anyone got any ideas? thank you!
View 2 Replies
View Related
Apr 23, 2008
I have tried this on several different operating systems (VISTA and XP ) and several versions of SQL NATIVE CLIENT including 2005.90.3042.0
I have a 64 bit "SQL NATIVE CLIENT" connection that fails. The exact same connection and code succeeds on 32 bit.
My customer and I prepend "oledb:" to the connection string and it starts working.
FAILS on 64 bit:
Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Wrigley_Test;Data Source=MONGO;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=RIPTIDE;Use Encryption for Data=False;Tag with column collation when possible=False;MARS Connection=False;DataTypeCompatibility=0;Trust Server Certificate=False
WORKS
oledb:Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Wrigley_Test;Data Source=MONGO;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=RIPTIDE;Use Encryption for Data=False;Tag with column collation when possible=False;MARS Connection=False;DataTypeCompatibility=0;Trust Server Certificate=False
I debugged my code to the point that I know it is happening when I call CreateAccessor for my SQL statement.
m_hr=m_pIAccessor->CreateAccessor(DBACCESSOR_ROWDATA, GetCols(), (m_pDBBinds+IsBookmarked()), 0, &m_hAccessor, NULL);
Error:
Microsoft SQL Native Client: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
Does anyone have any suggestions?
View 6 Replies
View Related
Mar 7, 2004
Attempting ODBC connection to SQL Server by MachineNameSqlServerName doesn't work.
Can only connect by using IP address of server machine with name of SQL Server instance.
Any help would be appreciated.
thanks
View 3 Replies
View Related
Oct 31, 2007
Hi folks,
I have installed SQL Server 2005 on my Domain Controller successfully
and installed the SQL Server tools from the DVD including workstation components on my XP client computer (which is actually hosting the Domain controller as virtual VMWare machine).
The authentication is set to mixed mode and I have created a login with all possible rights on SQL Server, but which is at the same time my Domain Admin (So the user is setup in SQL Server in the format Domainuser)
Now when I open any client program (SQL Srvr2005 Management console, or Toad for SQLSrvr) and try to connect, the client does find the server correctly, but I cannot login.
The error status is actually 1, which means "unexpected internal error" as far as I have read.
I have turned off Windows firwalls by default and also turned off my custom firewall to see if it makes a difference, but it doesn't.
My activated connection protocol on both the server and the client is TCP/IP and I have then changed the port on both the server and the client to a common 4665, which I then granted full passage through my firewall.
Now the error has changed and says "the target machine has actively refused the connection", with status code 0... ???
So that's my current situation... Please, can anyone help me? What am I doing wrong?
Any tips would be appreciated,
-Patrick-
View 3 Replies
View Related
Jul 23, 2005
Hi ;I m trying to create Merge Replication. I was able to create thereplication on the same machine, however my aim is to use clientmachine and do all the neessary work on the client machine and thensynchronize to the server. Thus, I have installed client version of SQL2000, I connected to the database server, the thing is when I go offline I lose connection. Is there any way to create the subscription into the client machine as an off line user then synchronize it ?Or DO Ihave create my shopshot on the client machine?If someone can help me I would really appreciateRegardsAs
View 1 Replies
View Related
Mar 6, 2008
Hi.
I have a SQL server with mixed authentication, the user 'sa' is the password zitiz configured. And attach the database server. Locally connection not informing me about errors connection, but when I try to access from the client informs me that there is no server or SQL server has been denied access to the same.
Parameters connection are in a file. Ini contains:
DriverName=MSSQL
HostName=ST-02SQLEXPRESS
Database=MANEXKA
USER_NAME=sa
Password=zitiz
BlobSize=-1
ErrorResourceFile=
LocaleCode=0000
MSSQL TransIsolation=ReadCommited
OS Authentication=True
It has windows xp sp2, framework. Net 2.0 on the server and the client and the firewall is disabled.
How to verify the client or the need to configure the server?
Thank you
View 1 Replies
View Related
Apr 7, 2000
Here are the error messages:
Enterprise Manager:
A connection could not be established to SERVERNAME - Client unable
to establish connection ConnectionOpen (CreateFile())
Query Analyzer:
Unable to connect to server ServerName
Server Msg 67, Level 16, State 1
[Microsoft][ODBC SQL Server Driver]Client unable to establish connection
I can't register any other new servers, even ones in my workgroup. I'm connecting using named pipes, but have also tried using TCP/IP setting it up using Client Network Utility.
When i log on to another machine using my network login - I can connect.
There have been no problems connecting in the past and I haven't changed anything on my machine - any ideas???
View 1 Replies
View Related
Oct 18, 2000
Hi Guys.
We have a clustered server. When i create DTS packages in the secondary server I can get all the connection. But when i create DTS package that has connection to other servers. I am getting the follwing error. So my jobs that runs the DTS packages are failing.
Error Source: Microsoft OLE DB Provider for sql server
Error Description: Client Unable to establish connection.
Connectionopen(createfile())
I deleted all the entries in the Client network utility and recreated with ip addresses and TCP/IP protocol.
Added all the ip addresses to Lmhosts and host files.
Check the Server Network Utility.
I dont have a clue now.
Anyhelp are well appreciated.
-Thanks
-MAK
View 4 Replies
View Related
Feb 4, 2008
I cannot connect to my SQL2005 server using the old SQL ODBC drivers, I have to use the Native client drivers. The database I am trying to connect to is a SQL 2000 db I just attached. Its owner is a SQL user login, which works fine and can connect remotely.
Thoughts?
Possibly related: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=96732
View 1 Replies
View Related
May 4, 2007
I have a VB 2005 synchronization application that successfully pulls (through RDA) data to a SQL 2005 Mobile DB at my place of business, but when I try it at home on my SSL VPN Client connection, I get Hresult -2147012889 ("A request to send data to the computer running IIS has failed."). Typically, a -2147012889 error is a connection issue that relates to resolving the server name.
Here's a snippet:
Dim RemoteConn As String = "Provider=sqloledb; Data Source={company server};" _
& "Initial Catalog={companyDB}; User ID={username}; password={pass}"
'& "Persist Security Info=False;Integrated Security=False"
Dim SourceURL As String = "http://{Company server name}/MobileConnection/sqlcesa30.dll"
Dim SqlRA As New System.Data.SqlServerCe.SqlCeRemoteDataAccess
SqlRA.LocalConnectionString = strConn
SqlRA.InternetUrl = SourceURL
SqlRA.InternetLogin = ""
SqlRA.InternetPassword = ""
SqlRA.CompressionLevel = 3
Try
(Perform Pulls...etc..)
When I pull the sourceURL string and plug it into IE, it works fine. I get the "SQL Server Mobile Server Agent 3.0" message indicating that I have a solid connection over to IIS. That works fine.
But I can't figure out anything in the program. I've rotated the IP address with the name resolution and neither works for me in the program. The difference though when I use the IP address for the server is that I get a slightly different Hresult of -2147012867 (which means you can't connect to the server).
Also, I have IIS configured for anonymous access, the SQL DB I'm trying to pull from isn't restricting access, and my company doesn't have a proxy I need to go through.
Does anyone have any ideas for this issue?
View 3 Replies
View Related
Jul 20, 2005
Hello:How does one pool a connection object? I have the same application runningon 4 different machines, all connecting to the same server/SQL Server 2000instance for DB activity.Some posts have mentioned pooling the connection objects to reduce overhead,but how do I do that for the 4 separate computers.Appreciate any response.Regards,Ryan Kennedy
View 1 Replies
View Related
Jan 9, 2001
Hi,
We have SQLSERVER 7.0 in one of the production.
The clients r connected thru ODBC.
The clients doesn't gets disconnected after a task result in
increase in sqlserver log.
Can anyone advice me .
Thanks in advance
Anu
View 2 Replies
View Related
Oct 28, 2015
I used the selfssl.exe tool to generate a certificate on my db server, successfully added to Personal Certificates in MMC, added R/W permissions for the service account to the cert, selected the new certificate in the protocols for mssql and restarted the service. So far so good, however when trying to connect from SSMS with encryption check box checked I get the following error:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.) (Microsoft SQL Server, Error: -2146893019)
The certificate chain was issued by an authority that is not trusted.
When I look in MMC, the only intended purpose for the certificate is "Server authentication" and I'm not able to add "Client authentication". Does selfssl.exe not support client authentication?
View 2 Replies
View Related
Jun 7, 2007
Hi,
I am not sure if I select right Froum:)
It might be a basic question but could you please help me on that?
Working Environment:
I have developed application on SQL Server 2005 and now wants to Run on Client Site, I am using access as a front end and SQL server 2005 back end through ODBC (System Dsn) which is working good. (user has been added on SQL Server and on Database)
Question:
1) Do I need to create new System Dsn Or other DSN (Keep in mind I have already create System DSN in Server) at each client site to access application from Server?
(If yes then I am trying to do that, it allow me to create (with required database which is on Server) and verify but doesn’t save on ODBC list so I can’t use that name to run appliation on client site)
I am using windows authentication.
Thanks for help in advance
AA
View 4 Replies
View Related
Jul 23, 2005
I'd like to do this:Have a SQL Server database hosted on a public facing web server.I want it to be held at an ISP/Web hosting company. Though I have ADSL hereI don't want to manage a server.I want some ASP pages accessing the database.I would also like for a very small number (probably 2) of users to accessthe database from a richer client. Perhaps Access/VB.I've tried using www.shanje.com, as a test. It seems to work, though thereare worries about security.I want to keep cost down!On 'normal' shared MS hosting, would it be possible to connect to the dbfrom a client like Access. The way most web hosts talk it doesn't look likeit.Is there any way of providing a richer client interface than plain webpages? I want things like autocomplete (beyond the first character) for dropdowns, keyboard shortcuts etc.This would be low volume. Essentially a private database held on theinternet.Yours, Jo
View 2 Replies
View Related
Jan 26, 2007
Hallo
i'm experiencing an extremely slow connection from a WXPP Sp2 client to a MSSQL2000 running on a W2k server. The client is running a VB6 application that connect with Windows authentication: every form requesting data opens with a long delay at the first launch; next attempts run normally fast.
In the same LAN there are some others identical clients, all running fine.
Every other network activity from that client is ok.
Where should i start to investigate from?
View 3 Replies
View Related
Oct 2, 2007
The following error message was displayed in the SQL server event log when the client application attempted to connect to sql server
"The Tabular Data Stream (TDS) version 0x72020002 of the client library used to open the connection is unsupported or unknown. The connection has been closed. [CLIENT: XX.XX.XX.XX]"
Can anyone tell me what this means?
Thanks
View 2 Replies
View Related
Apr 7, 2006
MS SQL 2000:
I can retrieve "host" name of the current connection from "sysprocesses" system table(select host from sysprocesses). But is it possible to get the IP address of the client connection instead of host?
I could not find any stored procedures or extended procedures that would let me retrieve such information.
thank you in advance.
View 6 Replies
View Related
Mar 18, 2008
Hi,
Our 32-bit applications connect to SQL Server 32-bit through OLEDB with Shared memory as preferred protocol. Our client applications and SQL Server generally reside on same machine.
We are evaluating possible impact when SQL Server 2008 64-bit is accessed with our 32-bit client applications running on 64bit WindowsServer 2008. Can shared memory protocol will be still used by underlying SQL server OLEDB dll considering the client application is 32-bit where as SQL Server is 64-bit ? Or it will switch to Named pipes or TCP/IP automatically ?
Thanks
prayags
View 3 Replies
View Related
Jun 7, 2007
Hi,
It might be a basic question but could you please help me on that?
Working Environment:
I have developed application on SQL Server 2005 and now wants to Run on Client Site, I am using access as a front end and SQL server 2005 back end through ODBC (System Dsn) which is working good. (user has been added on SQL Server and on Database)
Question:
1) Do I need to create new System Dsn Or other DSN (Keep in mind I have already create System DSN in Server) at each client site to access application from Server?
(If yes then I am trying to do that, it allow me to create (with required database which is on Server) and verify but doesn€™t save on ODBC list so I can€™t use that name to run appliation on client site)
I am using windows authentication.
Thanks for help in advance
View 1 Replies
View Related
Oct 18, 2006
Hi,
I have two server instances of SQL on my server MYSRVR: default (SQL 2000) and named SQLX (SQL 2005).
I've been using these strings ok for the default (SQL 2000):
"Server=MYSRVR; Database=mydb; Network=dbmssocn; Integrated Security=SSPI "
"Server=192.168.1.128; Database=mydb; Network=dbmssocn; Integrated Security=SSPI "
and these for the named (SQL 2005)
"Server=MYSRVRSQLX; Database=mydb; Network=dbmssocn; Integrated Security=SSPI "
"Server=192.168.1.128SQLX; Database=mydb; Network=dbmssocn; Integrated Security=SSPI "
But then adding the SQL port 1433 works for the default:
"Server=MYSRVR,1433; Database=mydb; Network=dbmssocn; Integrated Security=SSPI "
"Server=192.168.1.128,1433; Database=mydb; Network=dbmssocn; Integrated Security=SSPI "
But this, for named (SQL 2005) actually connects to default. The SQL port is causing the name SQLX to be ignored.
"Server=MYSRVRSQLX,1433; Database=mydb; Network=dbmssocn; Integrated Security=SSPI "
"Server=192.168.1.128SQLX,1433; Database=mydb; Network=dbmssocn; Integrated Security=SSPI "
Anyone any ideas?
View 5 Replies
View Related
Jul 2, 2007
i am using sql2005 on win2k3(sbs) platform(domain concept).my client is winxp.when i am tring to connect from client pc i am getting following error message.
connection failed
sql state 01000
sql server error 233
microsoft odbc sql server driver(dbnetlib) connection open (connect)
connection failed
sql state 08001
sql server error 17
microsoft odbc sql server driver(dbnetlib)sql server does not exist or access denied
please solve this problem.
View 1 Replies
View Related
Jul 31, 2006
Please see following code :
SqlConnection conn=new SqlConnection(@"something....;");SqlCommand comm=new SqlCommand("Select TOP 10 * FROM TableReaderTest WITH (HOLDLOCK) ",conn);
conn.Open();SqlDataReader rd;conn=null;
try{ rd = comm.ExecuteReader(); rd.Close();}catch (Exception ex){ MessageBox.Show(ex.Message);}
This Code works fine. I have set conn=null, still datareader is able to read the data. Why?
Thank you.
View 6 Replies
View Related
Feb 23, 2006
I have been writing a custom source adapter that uses a file connection within the connection manager. If I hard-code a specific file then the component works. However if I use a file connection that has an expression defined which updates the connection, for example when you have a for-each loop looping over a set files. The file connection doesn€™t seem to re-evaluate expression each time you access the file connection via the code. Is there something that I am missing or is there a bug?
View 10 Replies
View Related
Dec 1, 2003
I have Installed MSDE SP3a (sql2kdesksp3.exe) on a Windows 2003 Web Edition Server.
The security mode is win/sql. I can log in with both Win NT and SQL security localy, from both EM and MSDE manager.
(in the end of the installation, no dialog show, and the agent does not start automaticly, started on restart)
The MSDE is installed from cmd, with no SAPWD but SecurityMode=SQL.
But from another client on the network (same domain), I can´t connect. I get the "SQL Server Does Not Exist or Access Denied" Error Message
I have check the regestry for the tcpip port settings. And its not 0.
I have read some other MSDE related threads, but no luck.
Any hints what to check new, to try to solve this problem ?
peace.
View 3 Replies
View Related
Jul 20, 2005
Hi,I am seeing very slow connections from some client enterprise managersto server. Even at server level it takes 1 minute or less to open adatabase. I have adjusted some of the memory for the SQL server, butthere are only about 60 Dbs on the server, totalling about 2 GBs.CPU is very low at all times, 1 GB of ram, p3 1.4Ghz. SQL 2k.I know I should refrag the disk, but is there anything else I can doto speed up SQL operation via enterprise manager--ODBC connections is fairly fast, as well as query analyzer.Adam
View 2 Replies
View Related
Mar 1, 2007
Error: Ole db error 0x80004005 Client unable to establish connection
This happens when trying to create a maintenance plan in sql 2005 sp 1
It has now happend with 3 installs - one fresh install and two upgrades from 2000 to 2005. The startup account for sql server is a domain user account and has not been changed. This happens on both windows 2000 and windows 2003.
This however does not happen if the sql startup account is in the local admin group for the machine
Any help is greatly appreciated
Thanks
KR
View 2 Replies
View Related
May 25, 2006
I was wondering if any others on this list are getting a bug with the Flat File connection object --where in both csv (coma delimited) or flat files (tab delimited) where strange characters(like two bold vertical lines) are appearing in the file viewer while setting up a connection forcing the CRLF to end in the wrong place. They look like two bold vertical lines
Im testing the same files with both the old DTS from SQL Server 2000 and getting no issues which tells me there is a bug in SSIS. Strange thing the bug does not happen with every file I receive, only a few. I€™m wondering if SSIS Flat File Connection object could be a little flaky with respect to how it reads files compared to DTS text connection object.
email me d2ba@xtra.co.nz for a screen shot of tests
Thanks in advance
Dave
View 8 Replies
View Related
Jul 23, 2004
Hi,
I am a SQL DBA involved in accomplishing various activities using Enterprise Manager by regestering servers of various countries.
Now as the NT Team has gone for auditing implementation in all the servers in OS lever, they find Access violations from the workstation from where I connect to the server. This does not happens if I unregester the Servers from Enterprise manager and use only query analyzer.
Note: We have our own users in OS as wel as in SQL SERVER .
Its Urgent!!! Please help!!!
View 4 Replies
View Related
Oct 28, 2015
I unable to setup a linked server on sql server 2012. The destination server is on sql server 7.0. I can able to setup the same linked server on sql 2005 sp4 and sql 2008 r2 but unable to setup on 2012. I am getting the below error message. OLE DB provider "SQLNCLI11" for linked server "" returned message "Client unable to establish connection due to prelogin failure".
Msg 10054, Level 16, State 1, Line 0
TCP Provider: An existing connection was forcibly closed by the remote host.
OLE DB provider "SQLNCLI11" for linked server "" returned message "Client unable to establish connection".
Msg 26, Level 16, State 1, Line 0
Client unable to establish connection because an error was encountered during handshakes before login. Common causes include client attempting to connect to an unsupported version of SQL Server, server too busy to accept new connections or a resource limitation (memory or maximum allowed connections) on the server.
View 2 Replies
View Related