Showing posts with label build. Show all posts
Showing posts with label build. Show all posts

Thursday, March 22, 2012

Connectivity Issue between XP, SQL Server 2000 & SPSS

Hi,
I am trying to build an application with Windows XP, SPSS & SQL
Server 2000. I am using SQL Server built in stored procedure 'xp_cmdshell'
with sa login to run batch file which starts SPSS. However 'xp_cmdshell'
keeps on running & nothing happens.
I tried the same thing on Windows 2003 server. It ran after I installed
.Net frame work 2.0 I did the same thing on Windows XP but it doesn't help.
I wonder what I have to do make it run on XP
Any help would be greatly appreciated.
Regards
IT Dev.Hi
"IT Developer" wrote:
> Hi,
> I am trying to build an application with Windows XP, SPSS & SQL
> Server 2000. I am using SQL Server built in stored procedure 'xp_cmdshell'
> with sa login to run batch file which starts SPSS. However 'xp_cmdshell'
> keeps on running & nothing happens.
> I tried the same thing on Windows 2003 server. It ran after I installed
> .Net frame work 2.0 I did the same thing on Windows XP but it doesn't help.
> I wonder what I have to do make it run on XP
> Any help would be greatly appreciated.
>
> Regards
>
> IT Dev.
>
I am not familiar with SPSS, but if you are trying to start a windows
application that requres user input from xp_cmdshell then you should try a
different method. I assume SPSS is on the SQL Server itself?
John

Connectivity Issue between XP, SQL Server 2000 & SPSS

Hi,
I am trying to build an application with Windows XP, SPSS & SQL
Server 2000. I am using SQL Server built in stored procedure 'xp_cmdshell'
with sa login to run batch file which starts SPSS. However 'xp_cmdshell'
keeps on running & nothing happens.
I tried the same thing on Windows 2003 server. It ran after I installed
..Net frame work 2.0 I did the same thing on Windows XP but it doesn't help.
I wonder what I have to do make it run on XP
Any help would be greatly appreciated.
Regards
IT Dev.
Hi
"IT Developer" wrote:

> Hi,
> I am trying to build an application with Windows XP, SPSS & SQL
> Server 2000. I am using SQL Server built in stored procedure 'xp_cmdshell'
> with sa login to run batch file which starts SPSS. However 'xp_cmdshell'
> keeps on running & nothing happens.
> I tried the same thing on Windows 2003 server. It ran after I installed
> .Net frame work 2.0 I did the same thing on Windows XP but it doesn't help.
> I wonder what I have to do make it run on XP
> Any help would be greatly appreciated.
>
> Regards
>
> IT Dev.
>
I am not familiar with SPSS, but if you are trying to start a windows
application that requres user input from xp_cmdshell then you should try a
different method. I assume SPSS is on the SQL Server itself?
John

Friday, February 24, 2012

Connection string not valid !

I've build a website with asp.net and on my local machine it run very we. but when I store my website on a server, I have a error : ...error: 25 - Connection String not valid...

This is my connection string on my local machine : "add name="csIyp" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|iyapason.mdf;User Instance=true" providerName="System.Data.SqlClient" "

And the connection string on my webserver : "add name="csIyp" connectionString="data source= .\MSSQLSERVER;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|iyapason.mdf;User Instance=true" providerName="System.Data.SqlClient" "

So, what can I do to solve this probleme.

Thanks !

Does your web server have an actual SQL Server Express database engine installed, or SQL Server 2005 of some kind (as in, not Express). If the later, attaching DB on the fly like that string does might not work.|||There is a SQL Server 2005 engine installed on my webserver and i think that the instance name is "MSSQLSERVER". so can I have a sample connection string?|||

Hi siebobby,

Base on my understanding, we will not install SQL Server Express on the web server. So I think MSSQLSERVER is not an Express Edition. If my supposition is incorrect, please feel free to point out.

AttachDBFilename is used to specify the database to attach to the user instance. And User instances only work in the Express Edition of SQL Server 2005. So you must change the connect string for new SQL Server, the string may likes below:

connectionString="Data Source=.\MSSQLSERVER;Initial Catalog=iyapason;Integrated Security=True"

Be sure attaching iyapason.mdf in the MSSQLSERVER first.

Sunday, February 19, 2012

connection string based on current user

Hi All,

His there any way to build a connection string to sql server based on the current user credential?

I mean, intead of using

user id=Admin
password=adminPass

Is it possible to do something like

user id= Context.User.ID
pass=?

I'm asking cause, iI don't want to use impersonisation in my code.
So that I can be sure logged user only sees what they can

(I'm a newbie, so this whole thing may makes no point
(thanks for clarifying

Yes this is definitely possible. You have to create a class which implements IIdentity class and IPrincipal. Check out the article:

http://msdn2.microsoft.com/en-us/library/ms172766(VS.80).aspx

|||

Thanks for the tip.
I've difficulty to see how to make it work.

I'm developping a web control so i don't really have any control on the the login process.
This confuse me, Does the IIdentity tecnics still apply? how?
Is there something like:
Context.IIdentity that I can write on my connection string?
(maybe i'm just not understanding the flow
(thanks for any help

|||

Hi tomypow,

Based on my understanding, connection string is just some xml configuration file so definitely we cannot write any code within it. And by the way, I don't think use different connectin string for different logged in user is a good idea. If you have 10,000 users in your site, you will have to create 10,000 connectin strings--so, in my opinion, I would suggest you use role management in your application instead.

Role management helps you to manage authorization, allowing you to specify the resources users in your application are allowed to access. Role management lets you treat groups of users as a unit by assigning users to roles such as manager, sales, member, and so on. In Windows, you create roles by assigning users to groups such as Administrators, Power Users, and so on.

After you have established roles, you can create access rules in your application. For example, your site might include a set of pages that you want to display only to members. Similarly, you might want to show or hide a part of a page based on whether the current user is a manager. With roles, you can establish these types of rules independent from individual application users. For example, you do not have to grant individual members of your site access to member-only pages; instead, you can grant access to the role of member and then simply add and remove users from that role as people sign up or allow their memberships to lapse.

I would suggest you read some materials on msdn :http://msdn2.microsoft.com/en-us/library/5k850zwb.aspx

Hope my suggestion helps

|||

Thanks Bo Chen.
It's all very clear now.
I will definitively use the role based approach.

Connection String - Does not conform to the OLE DB specification

I'm trying to build a connection string to SQL Server 7.0 from ASP.net w/ C#

I get the following error:
Format of the initialization string does not conform to the OLE DB specification. Starting around char[100] in the connection string.

What the heck does this mean? What am I doing wrong.. My connection string is below:

string strConnection = "Provider='Provider=SQLOLEDB; server=XXXXXX.XXXXXXXXXXXXX.COM;'UID=XXXXXX;PWD=XXXXXXX;DATABASE=XXXXXX'";

Is there a way to make good connection strings like a tool or something?

Thanks for your time.
thunkYou can add OleDbConnection control from toolbox to your form in Visual Studio .NET project .
Then go to properties -> ConnectionString and choose <New Connection...>
You will get a tool to make connection string and test connection.

Also, you can use Server Explorer (View -> Server Explorer) on the same way.|||A good reference for connection string information can be found athttp://www.connectionstrings.com.

Terri

Tuesday, February 14, 2012

Connection Reset

Hi all

I have build an application on top of SQL Server 2005 and i am using microsoft driver. My application stops periodically becoz of Database Connection Loss and I get the following exception

com.microsoft.sqlserver.jdbc.SQLServerException: An exception occurred during the DBComms.transmit operation. Exception:Socket closed. Context:(5) [Thread[Thread-55,5,main], IO:7e2dc, Dbc:null].
10:06:14:703 AM at com.microsoft.sqlserver.jdbc.SQLServerException.ma keFromDriverError(Unknown Source)
10:06:14:703 AM at com.microsoft.sqlserver.jdbc.DBComms.transmit(Unkn own Source)
10:06:14:703 AM at com.microsoft.sqlserver.jdbc.IOBuffer.sendCommand( Unknown Source)
10:06:14:703 AM at com.microsoft.sqlserver.jdbc.SQLServerStatement.se ndExecute(Unknown Source)
10:06:14:703 AM at com.microsoft.sqlserver.jdbc.SQLServerStatement.do ExecuteQuery(Unknown Source)
10:06:14:703 AM at com.microsoft.sqlserver.jdbc.SQLServerPreparedStat ement.executeQuery(Unknown Source)

Unable to find the exact reason for the above problem. Pl advice

Thanks & Rgds
RoshiniIt apppears to me that you get some kind of timeout, and the connection is closed, but I might be proven wrong. Nevertheless, you should handle such cases, as this may happen even in the most critical high availability solutions, for instance if a SQL Server Cluster is failing over. Applications should be able to reconnect automagically.