w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Impersonation in SQL Server Views?
No, this is not possible. EXECUTE AS is mainly used with SP's, but you can use them a bit more widely. From TechNet: In SQL Server you can define the execution context of the following user-defined modules: functions (except inline table-valued functions), procedures, queues, and triggers. ... Functions (except inline table-valued functions), Stored Procedures, and DML Triggers { EXEC | EXECUTE } AS { CALLER | SELF | OWNER | 'user_name' } DDL Triggers with Database Scope { EXEC | EXECUTE } AS { CALLER | SELF | 'user_name' } DDL Triggers with Server Scope and logon triggers { EXEC | EXECUTE } AS { CALLER | SELF | 'login_name' } Queues { EXEC | EXECUTE } AS { SELF | OWNER | 'user_name' } However, you have some options here: create GET-SP's that

Categories : Sql Server

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON' when accessing sql server from a wcf service with impersonation
The error that you are getting is likely because the IIS Application Pool that your web application is using is running under an account that doesn't have SQL Server privileges. Change the Application Pool Account to one that can access SQL Server and the problem should go away.

Categories : Asp Net

Batch File Connecting to Server and execute program install on connected server
Here's a little code to help you connect to the SQL server and interrogate the SQL version. @ECHO OFF SQLCMD /? > nul 2> nul IF ERRORLEVEL 1 ECHO.SQLCMD not found on this machine & PAUSE & GOTO :eof SET SQLCmdLine=SQLCMD -b -w400 REM use something like the next line for NT authentication; second line for SQL authentication REM for NT SET SQLCmdLine=%SQLCmdLine% -E -S "YourServerName" REM for SA SET SQLCmdLine=%SQLCmdLine% -U "YourSQLUserName" -P "YourSQLPassword" -S "YourServerName" SET Database=YourDatabaseName REM I will use NT Authentication for this example SET SQLCmdLine=%SQLCmdLine% -E -S "(local)" SET TestSQLCmdLine=%SQLCmdLine% -h-1 -d "%Database%" REM this will get the SQL version %TestSQLCmdLine% -Q "SELECT @@VERSION" | FINDSTR /v "rows affected" REM this will

Categories : SQL

sqlsrv error while connecting to mssql server 2008 on windows 2003 server
Two ways to try, first to check if the Native driver has the right version - is your server really a 32bit Version and not 84bit? The other thing is, to check if the extensions are actually loaded. To check that, create a file like "phpinfo.php" and put it in you folder for .htdocs. <?php // show phpinfo file phpinfo(); ?> The easy way is to search for it in the phpinfo-Page with Ctrl+F and "extension=php_sqlsrv_53_ts_vc9.dll"

Categories : PHP

Connecting to a SQL Server DB
Well this seems to work ok, use DBI; # $dbh = DBI->connect( "dbi:mysql:DBNAME", "root", "password" ) or die "Connection Error $DBI::errstr "; N.B. Please Check you have the required modules installed.

Categories : Perl

How can I use one Windows account for ASP.Net impersonation, and a different windows account for a Sql Server trusted connection in the same app?
Ultimately I wanted to be sure that the same rules apply now, that Identity Impersonation on a web app will pass user credentials to a sql database using Windows AD authentication. Based on the comments above, that seems to be the case. Thanks everyone for their time, should any future readers see this Q&A and say "Eric's wrong and he's an idiot!", please feel free to correct me accordingly

Categories : Asp Net

Connecting to SQL Server in Xcode
One route to take is to make a copy of that Database and put it on the phone as an SQLite Database and have a PHP script that gets the newest additions and adds them to the SQLite database. A second route you could take, is you could ask him to put it JSON format and you would have a dictionary on the phone that held all of the JSON, and then parse the JSON using apples built in parser, NSJSONSerialization or any of the other JSON parsers out there. Using the parsed JSON, you could then do as you please with the list of notifications Another method will be for that guy to write a PHP script for you to access all the notifications and you run that in a for loop and populate a table, or whatever, on the phone of the latest push notifications that way. This while take a few seconds longer t

Categories : Iphone

Connecting Sql Server though Node.js
I just did it following this walkthrough at http://tech.pro/tutorial/1848/getting-nodejs--sql-server--azure-to-work-together He's using the "msnodesql" package at https://www.npmjs.org/package/msnodesql, code at git-hub at https://github.com/WindowsAzure/node-sqlserver, and I've got it running in a node-console app with a simple select-statement: var mssql = require('msnodesql'); var conn_str = "Driver={SQL Server Native Client 10.0};Server=tcp:xxxxx;Database=yyyy;Uid=zzzz;Pwd=wwww;Connection Timeout=30;"; mssql.query(conn_str, "select * from testtable", function(err, recordset) { if(err){ console.log("Got error :-( " + err); return; } recordset.forEach(function(record) { console.log("name: " + record.Name + " (" + record.ID + ")"); }); });

Categories : Sql Server

connecting to an SQL Server database
The problem your having with regards to connecting to the database on a server is because of SqlConnection dbConnection = new SqlConnection("Data Source=.\SQLEXPRESS;Integrated Security=true"); The best way to do this is to go to your Web.config file and find the block and add a connection to your database in there. eg <add name="ConnectionString" connectionString="Data Source=YOUR SERVER;Initial Catalog=YOUR DATABASE;User ID=YOUR USER ID;Password=YOUR PASSWORD" /> then you can just call the connection string accross your whole project whenever you need to use it. Also with regards to VS2012. There are very few companies using that IDE at the moment so your probably better off learning VS 2010 in the most part but i would agree that VS2008 is fairly out of date now

Categories : C#

Connecting to wamp server from different pc
you need to follow the below steps: 1.in httpd.conf DocumentRoot "C:/xampp/htdocs" //add your wwwroot folder path (this is Xampp example) <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory> 2.Open httpd-vhost.conf and add: ##</VirtualHost> <VirtualHost Name:80> DocumentRoot C:/xampp/htdocs/wwwroot/ <Directory "C:/xampp/htdocs/wwwroot/"> Options Indexes FollowSymLinks Includes execCGI AllowOverride All Order Allow,Deny Allow From All </Directory> ServerAdmin (any@email.com) ServerName (IP address or FQDN) </VirtualHost> 3.The most Important step is to add an exception for the used port(80 in this example) on windows firewall. Hope this helps :)

Categories : PHP

issues in connecting to AD server over SSL?
If you can't get TLS to work, it is unlikely that SSL will work. Are you sure that you got the right certificate and configured the keystore correctly? Based on the SSLHandshakeException when trying to use TLS, it would seem that may not be set up correctly. Check out this SO answer for some tips on how to verify that your keystore is correctly set up: http://stackoverflow.com/a/9619478/1792088

Categories : Java

Connecting to database server using php
This should be basically the mysqli version of what you wrote. <?php $username = "user"; $password = "pass"; $hostname = "creative.coventry.ac.uk"; $mysqli = new mysqli($hostname, $username, $password, "asantec"); $stmt = $mysqli->prepare("SELECT * FROM books;"); $stmt->execute(); $stmt->bind_result($id, $title, $author, $price); //Put all your expected variables here while ($stmt->fetch()) { echo $id.'<br />'; echo $title.'<br />'; echo $author.'<br />'; echo $price.'<br /><br />'; } $mysqli->close(); ?> Also, if you have any issues in the code you've posted, this will work. Check your DB credentials and the data you're querying.

Categories : PHP

Connecting to sql server 2008 using vb
In DBConnect, check the status of objConn to make sure it's really being opened. In DBConnect, you have exit function before response.write. In GetValue, check value of err.number.

Categories : Vb.Net

Client isn't connecting to server
Always create output output stream before your input stream for Object streams, otherwise you create a deadlock situation. output = new ObjectOutputStream(socket.getOutputStream()); // output.flush(); if the underlying stream is buffered input = new ObjectInputStream(socket.getInputStream()); The input reads the header written by the output, which won't be there unless the output is created first.

Categories : Java

Connecting Android and java EE server
You can use JAX-RS to build a RESTful Webservice, and you can use JSON as the payload. Jersey is a reference implementation, and is a good one. There is JSON support as well.

Categories : Java

Getting an error when connecting from android to PHP server
There are issues with your PHP. You are not passing back any JSON. You will need to change your script to encode your array into JSON. $result = json_encode($json) Returning the actual JSON will help. Make sure you are not returning any HTML either. Your Java is trying to parse a JSON response, but you are responding with <!DOCTYPE...

Categories : Java

Connecting to smtp server windows C++
In the following line: sock = socket(AF_INET, SOCK_STREAM, 0); You do not specify a protocol. You should change it to sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); This is the kind of protocol you are going to want to establish with something such as a mailing service.

Categories : C++

Connecting to remote server with pgadmin
Specify a different local port in the script. The specified port is already in use by something else, possibly a local PostgreSQL running on port 5433. That's really just a toy wrapper around an SSH tunnel. Personally I tend to just fire up the ssh tunnel directly when I need that, or ssh into the remote machine and use psql on it locally.

Categories : Postgresql

Error connecting to server in a file
This line: inet_aton(h->h_addr_list[0],&indirizzo_server); is wrong. h_addr_list is not a list of strings in the format that inet_aton expects. It's not even a list of strings at all. It's a list of addresses ready to be copied directly into the appropriate field of the struct sockaddr_*. The char **h_addr_list in struct hostent should be treated as void **, which is what it would be if it hadn't been designed before ANSI C gave us void. A generic pointer is used because gethostby* supports (at least theoretically) arbitrary address families. In the case of h_addrtype==AF_INET, each h_addr_list[n] is a pointer to a struct in_addr, so you can just say indirizzo_server = *(struct in_addr *)h_addr_list[0]; and all will be well.

Categories : C

Connecting to SQL Server using windows authentication
A connection string for SQL Server should look more like: "Server= localhost; Database= employeedetails; Integrated Security=True;" If you have a named instance of SQL Server, you'll need to add that as well, e.g., "Server=localhostsqlexpress"

Categories : C#

Swing GUI freeze when connecting to ftp server
BackSlash's comment is right on. you should avoid executing code in the GUI thread precisely because it "freezes" the UI until the code finishes. In your case connecting to a remote server is a potentially lengthy operation, that's why you see the UI hang. You should familiarise yourself with the Swing Thread Model, the Event Dispatch Thread (EDT) and related concepts. Start in Oracle's own documentation, and may I suggest the first chapters of the book Filthy Rich Clients, a great book for rich client applications with introductory chapters on all things Swing. Now for your question, you create a new class extending SwingWorker and implement doInBackground and done. doInBackground is executed outside the EDT so it will not block your UI, and done is called once the task is completed. Fro

Categories : Java

Connecting to my company mail server
You could you outlook.com's web based interface to connect to POP3 accounts, similar to what you do in outlook express. Similarly you could add your email as additional account in gmail too.

Categories : Email

Not seeing database from localhost but seeing it when connecting to server
GRANT USAGE is not what you want. According to the mysql documentation: USAGE Synonym for “no privileges” It is used at the global level with GRANT to modify account attributes such as resource limits or SSL characteristics without affecting existing account privileges. http://dev.mysql.com/doc/refman/5.1/en/grant.html You need to grant actual privileges to your "someuser" user for the database the user needs to see. For example, if you grant select privileges on the mysql.*: GRANT SELECT ON mysql.* TO someuser@localhost IDENTIFIED BY "somepassword"; FLUSH PRIVILEGES; Now, someuser connected from localhost will be able to see the mysql database when executing SHOW DATABASES; However, you might want to reserve the access to the mysql database for root only.

Categories : Mysql

Connecting to an FTP server on IPv6 in python
After looking at the code of ftplib.py, it seems to me that the code is absolutely ready for IPv6. The library knows about EPSV and EPRT and uses them where appropriate. E.g., def makepasv(self): if self.af == socket.AF_INET: host, port = parse227(self.sendcmd('PASV')) else: host, port = parse229(self.sendcmd('EPSV'), self.sock.getpeername()) return host, port shows that it sends a PASV or an EPSV depending on which IP version we use.

Categories : Python

Connecting Windows Phone 8 to Sql server
Well, to achieve your goal, I would do: Build a REST webservice with ASP.NET Web API (http://www.asp.net/web-api) which returns objects (those objects will be translated to json automatically). For example: public class MyObject { public string Content { get; set; } } Controller for it: public class TestController : ApiController { [HttpGet] public MyObject Example() { return new MyObject() { Content = "Hello World!" }; } } Use a HTTP client in your win phone project: HttpClient client = new HttpClient(); client.BaseAddress = new Uri("http://mywebservice.com"); client.DefaultRequest.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); using (var result = await client.GetStreamAsync("test/example")) { var serializer = new JsonSerializer(); //

Categories : C#

Connecting by php to a python websocket server
I think your problem is in how you are packing the data. Without knowing which protocol you are trying to use, I can't tell you how to pack it! But, there is a working code snippet in one answer to this question.

Categories : PHP

When connecting to SQL Server what are the values for the datasource?
7CH3LM1 is your machine name, and it helps identify the instance of SQL Server you're connecting to. In this case, you are connecting to a named instance of SQL Server running Express Edition, and its instance name is SQLEXPRESS. A machine can run multiple instances of SQL Server concurrently, and it can have one default instance and 0, 1 or multiple named instances. To connect to the default instance, you would use 7CH3LM1, and to connect to a named instance, you would use 7CH3LM1<instance name>, as you have with 7CH3LM1SQLEXPRESS. I typically rename my machines to something a little more memorable and meaningful, as that can make things much easier, but that's just me. An instance of SQL Server can contain many databases. You can specify the database in your connection string as

Categories : Sql Server

Connecting C socket server from PHP using PHP Extension
Debug your code properly, could you receive parameters in your C Client code passed from PHP function call, I hope you will not get the parameters which you are passed from PHP function call. Check your parameters receive section, there you have to check the type of values sending from PHP should match the type of declaration in your C Client socket connection scripts. I hope replace your receive parameters section with my following code, it will work. if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls|b", &i_iPortNumber, &i_pcIPAddress, &return_long) == FAILURE) { RETURN_NULL(); }

Categories : PHP

Connecting to sql server 2008 database using C#
You connection string is wrong. It should be of this form if you use SQL Server Authentication: Server=myServerAddress;Database=myDataBase;User Id=myUsername; Password=myPassword; Where myServerAddress is the IP or host name of the computer running SQL Server. If it's your PC, localhost will probably work. myUsername and myPassword are the credentials of the user connecting to the server. If you use Trusted Connection,you connection string should be of this form: Server=myServerAddress;Database=myDataBase;Trusted_Connection=True; You can check more examples here: http://www.connectionstrings.com/sql-server/

Categories : C#

Connecting to SQL Server on a different port in SSRS
Syntax is the same as you would enter in SSMS. See below screenshot taken from the Data Source properties window:

Categories : Sql Server

JBoss web application not connecting to RMI server
The failure you are getting isn't with the 'RMI server' at all. It is with the RMI Registry. You are using Naming.lookup() where you should be using something JBoss-specific. As the exception suggests.

Categories : Java

Need help! Connecting MS SQL Server 2005 to Eclipse
You have to download the jTDS JDBC driver and add it to your classpath. You are loading this driver here: Class.forName("net.sourceforge.jtds.jdbc.Driver"); but it seems not to be available at runtime.

Categories : Java

Connecting to a TCP server via TcpClient through proxy
In this link you would get code to connect tcp via http proxy.

Categories : C#

Failure connecting to ldap server from clearcase dir
ClearCase in itself shouldn't be concerned with LDAP, not directly at least, considering its level of integration with LDAP: When LDAP authentication is enabled, users enter names and passwords through standard ClearCase dialogs (for example CCRC or CCWeb), and ClearCase will use the LDAP protocol to deliver the appropriate authentication. This is not to say that ClearCase is integrated with LDAP, it merely runs on top of the operating system already configured to use the LDAP protocol. In other words, ClearCase authenticates with the operating system, and will support LDAP transparently if the OS is configured correctly to support LDAP. Note that may have changed with ClearTeam Explorer and CC 8.x So if you weren't using LDAP before the migration for authentication, check if t

Categories : Dotnet

Connecting to mongodb on different server from rails console
Try with RAILS_ENV=production rails c or as @Rubyman suggested rails c production The problem with your command is that mongoid is searching for an environment called RAILS_ENV=production

Categories : Ruby On Rails

Connecting to SQL Server 2008 R2 Express on same subnet
Have you installed the SQL 2008 Native Client? That maybe your issue. http://www.microsoft.com/en-us/download/details.aspx?id=16978

Categories : C#

Null connection - Connecting to ASP.NET - Microsoft SQL Server
Key in web.config file is different then it is used in code. It should be, string connection = ConfigurationManager.ConnectionStrings["ApplicationServices"] .ConnectionString; And no need to wrap parameter names in single quote. string command = @" INSERT INTO Persons (username, firstname, lastname, email, password, gender, nationality,phone) VALUES (@username,@firstname,@lastname,@email,@password,@gender,@nationality,@phone)"; A side note, always dispose the ADO resources by using the using statement ( or calling Dispose()). using(SqlConnection connect = new SqlConnection(connectionString)) { // }

Categories : C#

Connecting remotly to a mysql server over ssh using c# for windowsce
I have found a solution for people having the same situation there is the solution without ssh connection 1/ add the MySql.SqlData.MyClient librery compact framework 2/add the privilege to access remotly to your MySql server

Categories : C#

Connecting to Oracle 11gR2 XE on Ubuntu 13 server via PHP
Alright, on the basis of received advice to seek the error in logs, I've found the message "*There is something wrong with your system - please check that ORACLE_HOME and LD_LIBRARY_PATH are set and point to the right directories*" and I decided to go through the sophisticated process of installing the Oracle InstantClient and reinstall OCI8 package, after the model from st-curriculum.oracle - with very small modifications, as follows: Oracle 11g R2 XE database and Apache2 / PHP server have been apriori installed on Ubuntu 13.10 server and system prepared (with prereqiuzite, swap file, kernel parameters, memory leak error recover, libraries and chkconfig emulator), as described in many posts. I stopped apache2 server service apache2 stop and started DRCP connection pooling as in st

Categories : PHP

Connecting to a remote machine through client-server
You say the other machine has an external ip address. This implies it also has a local ip address; ie it is behind a NAT firewall or similar. In this case, you will have to configure the firewall to allow communication to take place, eg by setting up port forwarding. Applications such as MSN Messenger, VOIP clients etc have elaborate mechanisms to negotiate this automatically, but they're often not very successful.

Categories : Vb.Net



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.