Showing posts with label string. Show all posts
Showing posts with label string. Show all posts

Thursday, March 8, 2012

cannot copy sqlexpress to another pc for vb.net 2.0 project update

Hi. I have done alot of searching around but can't find answer to this specific problem.

Here is my connection string in vb.net app config

<connectionStrings>
<add name="myfile.My.MySettings.ffgscrmConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\myfile.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>

The database is locally attached to the vb.net project residing in a data directory in the project. I am testing installation on a virtual pc - with no sql express managment or other sql server databases attached.

When I do a vb.net setup project and run this on, there is no problem. However, once having done that, when I want to update the app, I can't just copy in the new database along with exe. I get the error:"sql server does not allow remote connections (provider:sql network interfaces error 26 - error locating server/instance specified).

Is this a problem of the virtual PC? I am testing this because I need to be able to send updates to another local machine without using setup program.


Hi,

the destination machine where you copy the files on, does that have SQL Server Express installed ? Otherwise you won′t be able to use the .\SQLEXPRESS instance which points to a local SQLExpress instance on that computer. If there is a SQLExpress instance installed on that machine, make sure you enabled remote connections on this instance. I made a screencast for that, which can be found on my site in the screencast section which will show you how to enabled the remote conenction feature.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

Wednesday, March 7, 2012

Cannot convert between unicode and non-unicode string data type

HI.

I'm having this problem.

I use Visual Studio's, integration project to load XML file into SQL Server. In the XML file, i have defined collumns as string. When i try to load XML file with parts defined in scheme as string, i get an error "cannot convert between unicode and non-unicode string data type.

Destinated collumns in SQL are defined as varchar and char.

Thanks for help

I had the same problem and I put a Data Conversation object to convert the fields from XML to string [ST_STR] and everything works fine.

Hope this helps
Paulo Aboim Pinto
Odivelas - Portugal

|||Thank you. You saved me lot of work today. O have bypassed this problem with querry in SQL Server, but this solution is better. Thanks again.
|||

pkv wrote:

Thank you. You saved me lot of work today. O have bypassed this problem with querry in SQL Server, but this solution is better. Thanks again.

Please mark your post as answered if you've solved your own issue. It helps us to filter out which posts still require attention.|||Post from another topic that might help...
-

Katrina, you are a goddess among men. For anyone out there who still has this problem, Katrina has led me to the solution. I was still a little confused when I read it, so here are the exact steps I took to change it. I was loading from a flat text file. In the edit page of the file connection manager (not flat file source), go to the advanced tabs to see the columns. Here you can set the load type for the columns (I wanted non-unicode, so I chose String). Then you connect to (let's say) an OLE DB Destination. If you double click to open the connection, you can choose "metadata" and see the types are correct. Right click on the OLE DB Destination, and choose "Show Advanced Editor". Then click on the "Input and Output Properties" tab. Expand "OLE DB Destination Input" and you will see two folders ("External Columns" and "Input Columns"). If you open "Input Columns" and choose one of your columns, you will see the correct data type (ie. DT_STR). Now, if you expand the "External Columns" folder and choose one of your columns, you will see that it thinks an incorrect data type is coming in (ie. "Unicode string [DT_WSTR]"). This is what is causing your error. This makes the package think that it needs to implicitly convert what it THINKS is coming in (DT_WSTR) to what it wants (DT_STR), which it refuses to do. In the "External Columns" folder, change all of your data types to the correct incoming types, and all your worries will float away.
To aid in the discussion on many forums about why this is a problem, this is most definitely a Microsoft error. When you connect the source to the destination, the connection should force the destination to update its input types. Again, thanks to Katrina for leading the way!
|||

Tim/Katrina, that all sounds great. But when I change the External Columns to DT_STR, it doesn't save my changes!!!! I'll go right back into my OLE DB Destination, and whamo, it changes it back to DT_WSTR.

Any ideas?

I'm running:

Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727

SQL Server Integration Services
Microsoft SQL Server Integration Services Designer
Version 9.00.1399.00

|||

Hi..

Set ValidateExternalMetata option of the Destination False from True, and change types of external columns in Advnaced Editor.

Related Article and sample packages (written by Korean..Sorry!!)

http://www.sqlleader.com/mboard.asp?exec=view&strBoardID=SS2005SSIS&intSeq=807

test user_id and password : test / test

HTH

|||

OH MY GOD THANKS FOR POINTING THIS VALIDATEEXTERNALMETADATA OUT I HAVE SPENT HOURS FIDDLING WITH SETTINGS AND FINALLY IT WORKS!!!!!

But it totally sucks beyond belief that SSIS is so full of gotchas like this.

Cannot convert between unicode and non-unicode string data type

HI.

I'm having this problem.

I use Visual Studio's, integration project to load XML file into SQL Server. In the XML file, i have defined collumns as string. When i try to load XML file with parts defined in scheme as string, i get an error "cannot convert between unicode and non-unicode string data type.

Destinated collumns in SQL are defined as varchar and char.

Thanks for help

I had the same problem and I put a Data Conversation object to convert the fields from XML to string [ST_STR] and everything works fine.

Hope this helps
Paulo Aboim Pinto
Odivelas - Portugal

|||Thank you. You saved me lot of work today. O have bypassed this problem with querry in SQL Server, but this solution is better. Thanks again.|||

pkv wrote:

Thank you. You saved me lot of work today. O have bypassed this problem with querry in SQL Server, but this solution is better. Thanks again.

Please mark your post as answered if you've solved your own issue. It helps us to filter out which posts still require attention.|||Post from another topic that might help...
-

Katrina, you are a goddess among men. For anyone out there who still

has this problem, Katrina has led me to the solution. I was still a

little confused when I read it, so here are the exact steps I took to

change it. I was loading from a flat text file. In the edit page of the

file connection manager (not flat file source), go to the advanced tabs

to see the columns. Here you can set the load type for the columns (I

wanted non-unicode, so I chose String). Then you connect to (let's say)

an OLE DB Destination. If you double click to open the connection, you

can choose "metadata" and see the types are correct. Right click on the

OLE DB Destination, and choose "Show Advanced Editor". Then click on

the "Input and Output Properties" tab. Expand "OLE DB Destination

Input" and you will see two folders ("External Columns" and "Input

Columns"). If you open "Input Columns" and choose one of your columns,

you will see the correct data type (ie. DT_STR). Now, if you expand the

"External Columns" folder and choose one of your columns, you will see

that it thinks an incorrect data type is coming in (ie. "Unicode string

[DT_WSTR]"). This is what is causing your error. This makes the package

think that it needs to implicitly convert what it THINKS is coming in

(DT_WSTR) to what it wants (DT_STR), which it refuses to do. In the

"External Columns" folder, change all of your data types to the correct

incoming types, and all your worries will float away.

To aid in the discussion on many forums about why this is a problem,

this is most definitely a Microsoft error. When you connect the source

to the destination, the connection should force the destination to

update its input types. Again, thanks to Katrina for leading the way!|||

Tim/Katrina, that all sounds great. But when I change the External Columns to DT_STR, it doesn't save my changes!!!! I'll go right back into my OLE DB Destination, and whamo, it changes it back to DT_WSTR.

Any ideas?

I'm running:

Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727

SQL Server Integration Services
Microsoft SQL Server Integration Services Designer
Version 9.00.1399.00

|||

Hi..

Set ValidateExternalMetata option of the Destination False from True, and change types of external columns in Advnaced Editor.

Related Article and sample packages (written by Korean..Sorry!!)

http://www.sqlleader.com/mboard.asp?exec=view&strBoardID=SS2005SSIS&intSeq=807

test user_id and password : test / test

HTH

|||

OH MY GOD THANKS FOR POINTING THIS VALIDATEEXTERNALMETADATA OUT I HAVE SPENT HOURS FIDDLING WITH SETTINGS AND FINALLY IT WORKS!!!!!

But it totally sucks beyond belief that SSIS is so full of gotchas like this.

Cannot convert between unicode and non-unicode string data type

HI.

I'm having this problem.

I use Visual Studio's, integration project to load XML file into SQL Server. In the XML file, i have defined collumns as string. When i try to load XML file with parts defined in scheme as string, i get an error "cannot convert between unicode and non-unicode string data type.

Destinated collumns in SQL are defined as varchar and char.

Thanks for help

I had the same problem and I put a Data Conversation object to convert the fields from XML to string [ST_STR] and everything works fine.

Hope this helps
Paulo Aboim Pinto
Odivelas - Portugal

|||Thank you. You saved me lot of work today. O have bypassed this problem with querry in SQL Server, but this solution is better. Thanks again.|||

pkv wrote:

Thank you. You saved me lot of work today. O have bypassed this problem with querry in SQL Server, but this solution is better. Thanks again.

Please mark your post as answered if you've solved your own issue. It helps us to filter out which posts still require attention.|||Post from another topic that might help...
-

Katrina, you are a goddess among men. For anyone out there who still

has this problem, Katrina has led me to the solution. I was still a

little confused when I read it, so here are the exact steps I took to

change it. I was loading from a flat text file. In the edit page of the

file connection manager (not flat file source), go to the advanced tabs

to see the columns. Here you can set the load type for the columns (I

wanted non-unicode, so I chose String). Then you connect to (let's say)

an OLE DB Destination. If you double click to open the connection, you

can choose "metadata" and see the types are correct. Right click on the

OLE DB Destination, and choose "Show Advanced Editor". Then click on

the "Input and Output Properties" tab. Expand "OLE DB Destination

Input" and you will see two folders ("External Columns" and "Input

Columns"). If you open "Input Columns" and choose one of your columns,

you will see the correct data type (ie. DT_STR). Now, if you expand the

"External Columns" folder and choose one of your columns, you will see

that it thinks an incorrect data type is coming in (ie. "Unicode string

[DT_WSTR]"). This is what is causing your error. This makes the package

think that it needs to implicitly convert what it THINKS is coming in

(DT_WSTR) to what it wants (DT_STR), which it refuses to do. In the

"External Columns" folder, change all of your data types to the correct

incoming types, and all your worries will float away.

To aid in the discussion on many forums about why this is a problem,

this is most definitely a Microsoft error. When you connect the source

to the destination, the connection should force the destination to

update its input types. Again, thanks to Katrina for leading the way!|||

Tim/Katrina, that all sounds great. But when I change the External Columns to DT_STR, it doesn't save my changes!!!! I'll go right back into my OLE DB Destination, and whamo, it changes it back to DT_WSTR.

Any ideas?

I'm running:

Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727

SQL Server Integration Services
Microsoft SQL Server Integration Services Designer
Version 9.00.1399.00

|||

Hi..

Set ValidateExternalMetata option of the Destination False from True, and change types of external columns in Advnaced Editor.

Related Article and sample packages (written by Korean..Sorry!!)

http://www.sqlleader.com/mboard.asp?exec=view&strBoardID=SS2005SSIS&intSeq=807

test user_id and password : test / test

HTH

|||

OH MY GOD THANKS FOR POINTING THIS VALIDATEEXTERNALMETADATA OUT I HAVE SPENT HOURS FIDDLING WITH SETTINGS AND FINALLY IT WORKS!!!!!

But it totally sucks beyond belief that SSIS is so full of gotchas like this.

Sunday, February 19, 2012

Cannot connect to Sql server - help

Hi,
I used to work with Sql server 7.0 and my connection string was:
Provider=SQLOLEDB;User ID=sa;Password=;Initial Catalog=Eldat_DB;Data Source=YOSSIBA

After clean unregister and installing Sql server 2000 Using the same connection string I get the error:
Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection.

After removing 'sa' I got the error:
Login failed for user 'yossiba'. Reason: Not associated with a trusted SQL Server connection.

My configuration of the server was wrong?
How do I know Provider,Use ID,Password,Data Source parameters?
Please adviseI think you need to chek the connection string with respect to the logins on the server.And the corresponding frontend too.|||Originally posted by harshal_in
I think you need to chek the connection string with respect to the logins on the server.And the corresponding frontend too.

Hi,
When I entered EM..right click on the SQL Server | properties
I have noticed that under Security Tab 'This Account' is marked and the Domain and name are correct but the Password is not the same password I enter to my computer (it is longer).
Trying to change the password won't let me althogh I am registered as an administrator.
In addition to that the Authentication was Windows only, changing it to Sql server and Windows with sa and my computer password raised me and error: Login failed for user 'sa'.
Can that mess be cleared?
Thanks

Thursday, February 16, 2012

Cannot connect to sql database using Config app tool.

hi AllI'm new comer , the first time to work with Ent lib , I try to use modify sql connection string using configuration application tool integrated in Visual Studio against sql server 200 , I got this error .

_http://imagesshared.com/images/jdv1192388741v.JPG

I don't know how to solve my problem , someone please help me to overcome this problem .Thanks in advance .sorry for my poor English , I'm a Vietnamese student .

The problem is that you're trying to connect to a Sql server express user instance, but you're in fact using Sql Server 2000. You can modify your connection string to work with sql server 2000, or you can download and install sql server express - this is a free download from here:http://msdn2.microsoft.com/en-us/sql/Aa336346.aspx .

|||

DO the following modification in the Connection String of the App.Config / Web.config ...

Remove the AttributeUser Instance =true from the connection string that should solve the issue

|||

Thanks Svante , skurocks for replying

Then I solved my problem , thanks skurocks|||

Hi All

I got this error when I try to display whole record of customers table into GridView .

_http://imagesshared.com/images/opt1192519086n.JPG

This is the first time I work with Ent Lib 3.1 .

Here is my source code , please help me and explain to me why this error occur .

_http://www.4shared.com/file/26591127/38feb983/WebSite1.html?dirPwdVerified=814e49b

Thanks in advance for your time .

.........

Regards

Sunday, February 12, 2012

Cannot connect to database

I am attempting to connect to a database that has been uploaded to my server from my webpages on the server. This is the connection string that is currently used:

connectionString

="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Restaurants.mdf;Integrated Security=True;User Instance=True"

When attempting to connect to the database I receive this error message:

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)

I realize that I cannot make a remote connection using SQL Server 2005 Express Edition, but cannot find the proper connection string for it to connect to the uploaded database.

Accessing the database doesn't require a log on by the user as all the information is public.

The authentication mode in the web.config file is set to "Forms".

If there is any other information required so that this problem can be solved, please ask for it.

Thank you in advance,

Me

An error has occurred while establishing aconnection to the server. When connecting to SQL Server 2005, thisfailure may be caused by the fact that under the default settings SQLServer does not allow remote connections. (provider: SQL NetworkInterfaces, error: 26 - Error Locating Server/Instance Specified)

1.

Cause: Server not configured for remote connections.

The error is telling us that your server has not been configured to allow remote connections. If your SQL Server has not been configured to allow remote connections, then configure your SQL Server.

Fix:

SQL Server 2005 Open SQL Server Configuration Manager. Select "SQL Server 2005 Network Configuration | Protocols for MSSQLSERVER" then enable the protocols you need.

2.

Cause: ASP.Net 2.0 Providers are trying to pull from the server's (nonexistent) Providers database.

Bydefault the machine.config file is trying to pull the Providerinformation from a SQLExpress database using an invalid connectionstring named "LocalSQLServer". Many web servers will not haveSQLExpress enabled, and will not have this value set to a valid SQLServer database that is of use to you. In a shared hosting environment,this is especially true, as it would be expected that you would wantyour Provider information stored in your database and not some singledatabase shared by the other users of that web server.

Fix:

Since youprobably cannot access the machine.config file, you need to overridethe Provider settings in your web.config file, and set the connectionstring name to your connection string name. The following code comesfrom the machine.config file and has been modified to first remove eachprovider before adding the provider.

Add the following code to your web.config file just under the "<system.web>" tag.

Make sure to replace the 3 occurrences of connectionStringName="LocalSQLServer" with your connection string name.

1 <membership>23 <providers>45 <remove name="AspNetSqlMembershipProvider" />67 <add name="AspNetSqlMembershipProvider"89 type="System.Web.Security.SqlMembershipProvider,1011 System.Web, Version=2.0.0.0, Culture=neutral,1213 PublicKeyToken=b03f5f7f11d50a3a"1415 connectionStringName="LocalSQLServer"1617 enablePasswordRetrieval="false"1819 enablePasswordReset="true"2021 requiresQuestionAndAnswer="true"2223 applicationName="/"2425 requiresUniqueEmail="false"2627 passwordFormat="Hashed"2829 maxInvalidPasswordAttempts="5"3031 minRequiredPasswordLength="7"3233 minRequiredNonalphanumericCharacters="1"3435 passwordAttemptWindow="10"3637 passwordStrengthRegularExpression="" />3839 </providers>4041 </membership>4243 <profile>4445 <providers>4647 <remove name="AspNetSqlProfileProvider" />4849 <add name="AspNetSqlProfileProvider"5051 connectionStringName="LocalSQLServer"5253 applicationName="/"5455 type="System.Web.Profile.SqlProfileProvider,5657 System.Web, Version=2.0.0.0, Culture=neutral,5859 PublicKeyToken=b03f5f7f11d50a3a" />6061 </providers>6263 </profile>6465 <roleManager>6667 <providers>6869 <remove name="AspNetSqlRoleProvider" />7071 <add name="AspNetSqlRoleProvider"7273 connectionStringName="LocalSQLServer"7475 applicationName="/"7677 type="System.Web.Security.SqlRoleProvider,7879 System.Web, Version=2.0.0.0, Culture=neutral,8081 PublicKeyToken=b03f5f7f11d50a3a" />8283 </providers>8485 </roleManager>

Your database must be configured for the ASP.Net 2.0 Providers. This article assumes that you have already configured your database to use ASP.Net 2.0 Providers

http://www.aquesthosting.com/HowTo/Sql2005/SQLError26.aspx