Showing posts with label connection. Show all posts
Showing posts with label connection. Show all posts

Friday, March 30, 2012

How to change the default dateformat?

My Sql Server connection has default dateformat to "ymd".
I have to change the dateformat to "dmy" each time when I insert or
update a datetime table column e.g.with '31.12.2005' using the
"set dateformat dmy" command. Does anybody know, how to change the
default dateformat to avoid to perform the set dateformat on
each connection?
thanks
Libor
Look here:
You can change the settings of the server, but if yor provider will
change the settings during the login process and sets it back to the
default language settings of the user you have to convert the date in a
explicit format or change the codepage of the user:
http://groups.google.de/group/micros...2557646f8b9a9b
http://groups.google.de/group/micros...144e7348a7b6ff
HTH, Jens Suessmeyer.

How to change the default dateformat?

My Sql Server connection has default dateformat to "ymd".
I have to change the dateformat to "dmy" each time when I insert or
update a datetime table column e.g.with '31.12.2005' using the
"set dateformat dmy" command. Does anybody know, how to change the
default dateformat to avoid to perform the set dateformat on
each connection?
thanks
LiborLook here:
You can change the settings of the server, but if yor provider will
change the settings during the login process and sets it back to the
default language settings of the user you have to convert the date in a
explicit format or change the codepage of the user:
http://groups.google.de/group/microsoft.public.sqlserver.programming/browse_frm/thread/6496fbdbbd4cffd9/952557646f8b9a9b?lnk=st&q=serversettings+date+format&rnum=1&hl=en#952557646f8b9a9b
http://groups.google.de/group/microsoft.public.sqlserver.server/browse_frm/thread/6f543ebd963f6e20/46144e7348a7b6ff?lnk=st&q=%22Jens+Suessmeyer%22+boss+tibor&rnum=1&hl=en#46144e7348a7b6ff
HTH, Jens Suessmeyer.

How to change the default dateformat?

My Sql Server connection has default dateformat to "ymd".
I have to change the dateformat to "dmy" each time when I insert or
update a datetime table column e.g.with '31.12.2005' using the
"set dateformat dmy" command. Does anybody know, how to change the
default dateformat to avoid to perform the set dateformat on
each connection?
thanks
LiborLook here:
You can change the settings of the server, but if yor provider will
change the settings during the login process and sets it back to the
default language settings of the user you have to convert the date in a
explicit format or change the codepage of the user:
http://groups.google.de/group/micro...52557646f8b9a9b
http://groups.google.de/group/micro...6144e7348a7b6ff
HTH, Jens Suessmeyer.

How to change the data connection for another DB using different DSN name

Hi,

i have 2 MSSQL DBs.
im using DSN name to connect MSSQL DB to generate the report. for example, i have designed a report CR1 from the DB using dsn, named DSN1 which refers
the DB named Master1.

but now i want to connect the same report CR1 in a another dsn name called as
DSN2 which refers MSSQL DB named as Master2.
(because the both DB's have the same table, but i want the report to print from another DB's table. )

but at runtime if i do the coding from vb application like,

crystalreport1.connect = "DSN=DSN1"

(this coding works if the dsn name as DSN1)

its giving error msg like "error detected by database dll".

How could i make the data connectivity at runtime to point the different dsn name ie, DSN2. (consider i design the report manually at design mode of CR and connect the DB thru DSN ie, DSN1 refers Master1 DB and call it in vb application at runtime.):confused:
Hello

We have developed a report in crystal that connects with our local database. After development we want to deploy the same to our clients with different data soruce name and data base name.

Presently we are taking each report file and configuring the client database by replacing the existing data source.

How can we achieve this programmatically thru VB?

Thanks & Regards
subramanisql

Wednesday, March 28, 2012

How to change the connection string in a web.config file

I've recently uploaded my website, http://www.bigredsongbus.com, to my host. Unfortunately, they don't support the use of SQL Server Express. So, I've purchased an addon through my host - discountasp.net. I've attached my database file to their server, now all that I need to do is to change the connection string in my .config file so that it points to the SQL Server. I don't know how to do this. Any help, please?

Jeffrey Way

<connectionStrings>
<add name="<CONNECTIONSTRINGNAME>" connectionString="Data Source=<SERVERAME or IPADRESSPROVIDED BY HOST>;Initial Catalog=<DATABASENAME>;User ID=<USERNAME>;Password=<PASSWORD>" providerName="System.Data.SqlClient"/>
</connectionStrings>|||

<

connectionStrings>

<

clear/>

<

addname="LocalSQLServer"connectionString="Data Source=serverName;Initial Catalog=DatanaseName;Persist Security Info=True;User ID=sa;Password=sa"/></connectionStrings>

Hope this is what ur looking for

Friday, March 23, 2012

How to change from SQL Server Express to Database.mdf connection

Hi,

I've created a SQL Server Express Database that is used by an ASP.NET 2.0 application (developed using VWD Express).

I would like to be able to:

    Make changes to stored procedures, views and table structures while developing/testing ASP.NET application - which, ideally, needs a SQL Server Manager Studio Express connection and Upload my application and data to a database on a network - which, ideally, needs a direct Database.mdf connection.

I know that I need to change my connection string - and am able to achieve that with ease - but I'm not sure what the best way of switching between the two ways of attaching on the database side. I keep getting logon type problems etc.

Thanks very much.

Regards

Gary

Hi,

that should be normally straight forward using on of the user instances string for "attaching" the database to a instance temporarly (www.connectionstrings.com) Which error do you get while attaching ?

HTH, JEns Suessmeyer.

http://www.sqlserver2005.de

Wednesday, March 21, 2012

How to change Connectionstring in SQLCLR project?

Hi,

I have created a SQLCLR (database) using C#.. named SQLCLRtest

The Connection string is stored in SQLCLRtest.csproj file

here is code of csproj file

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AssemblyOwner>
</AssemblyOwner>
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{c252feb5-a946-4202-b1d4-9916a0590387}">
<DatabaseConnection Name="Data Source=DBserver;Initial Catalog=TestDB;Integrated Security=True" Provider="{91510608-8809-4020-8897-FBA057E22D54}" ConnectionString="01000000D08C9DDF0115D1118C7A00C04FC297EB01000000A2744997FFD51E459D0421E51E830EF30000000002000000000003660000A8000000100000005B59ACF96DA2A587CBFA27595B0F245E0000000004800000A000000010000000BB1D5F562AC3FE7F56F8E57C36E0E7A4B0000000CE828F399233A389D95E2D99B2CAA64DE5F5A19EF0CBB716D195DF60EE38B58B0C07674E2F80538C02ED27200C79A71B0F6F9177E598089CDA95B8DDEEF966A958C6EDE4E72CABBC39941FEED534E3384EF3A4B4A51704726BF5D43F2C3C9BD674885B9675FECD86E54498ED9E1957FCD7DCF0CE8ED99C8529FD9234EB4E760FDD6819E3E42A7771E0A5B18452C01C13976C0DDDF1B5B87D75F0490762C6A004AD093A3DF9210F7D03371D67E4901EB51400000005557E36590040C06F796463ABFEC165D2E60750" />
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>

Problem:

I have an sp which start an external process, It is working at my local machine but does not work at remote server.

FACTS:

Local machine has SQLExpress (SQL version) while remote machine has SQL Enterprise ..

SQL service is running under the System Account at both machines..

I have enabled the Sql server Service to interact with desptop, so that it can start a process in GUI mode.

I thin there is something in connectionstring which does not allow the application to connect to server with appropriate rights.

How I can chage this setting .. is it possible to write this info manually..

Please, comments

Thanks

You should be able to change the connection string from the database tab in project properties. When you click on browse, It will allow you to choose from different existing connections or add a new reference.

Thanks,

-Vineet

|||

Muna,

Did Vineet's post solve your problem? The reply is correct to my knowledge.

Derek

Monday, March 12, 2012

How to capture Package Validation Error?

Hi,

I have a package which has 5 connection managers. One of the Connection Manager has incorrect server name, which results in Package Validation error. Which event handler should be used to run on such errors for OnError Event handler doesnt work @. all.

Thanks

Prasad

I may be wrong; but I think if the validation step fails; the package logging nor event handler would work as they need a valid package. What you can do is to capture the output of the package execution command line. Eg if you are using sql server agent; and run the package as CmdExec step; you will see the validation error in the job log.|||

i dont see any errors in the job log which point out to invalid packages.

Is there any metadata table like sysdtspackages90 which can be queried to find out if the generated packages are valid or not?

|||You need to run the package through a CmdExec step, not from a SSIS step, as Rafael mentioned. This is the same as running it from the command line.|||using dtexec /validate we can validate the packages|||

2lazydba wrote:

using dtexec /validate we can validate the packages

Well now THERE is something I never knew. Thanks 2lazydba.

-Jamie