Showing posts with label aspnet. Show all posts
Showing posts with label aspnet. Show all posts

Friday, March 30, 2012

how to manage a DTS Package usin Asp.net

Hi

How i can manage a DTS Package usin Asp.net

Hi,

R u looking for DTS Packages or SSIS Packages. For any SSIS package you can execute it from .Net Code using the given Below Method

1. Name Space to Include

using Microsoft.SqlServer.Dts.Runtime;

2. Create a Package Variable in constructor it takes FileName of the DTSX Package (SSIS Package ). You can explore this class. It has a execute method

Hope this will help

Satya

Monday, March 26, 2012

How to make aspnet DB use local time zone?

I created aspnet DB on SQL Server 2K using aspnet_regsql utility. Everything works fine except the DateTime fields in all tables are using a wrong time zone. How do I set it to use my local time zone?

Any help will be greatly appreciated.

All stored procedures in aspnetdb use UTC-based datetime fields. That's pretty normal practice for any database that might need to be accessed from multiple time zones.

Wednesday, March 21, 2012

How to make a "SQL Server" connection with ASP.NET

Hi.

Working with ASP this connection works:


stringMyConn = "dsn=foo.com.bar;uid=john;pwd=xxxx;"
set myConn = Server.CreateObject("ADODB.Connection")
myConn.open stringMyConn

But it doesn't with ASP.NET

Dim myConn As SqlConnection = New SqlConnection("dsn=foo.com.bar;uid=john;pwd=xxxx;")
myConn.Open

What am I doing wrong? Thank you very much.

Since you are connecting to SQL Server, I don't recommend that you use a DSN connection. You can connect to SQL server as follows:

Dim myConn As New SqlConnection("server=;database=;user id=;password=;")
Dim myCmd As New SqlCommand("SELECT * FROM SOMETHING", myConn)

myConn.Open()

' ... Some code here to do something with the SqlCommand object

myConn.Close()

For future reference, a good source for connection strings isConnectionStrings.com.