Tuesday, June 8, 2010

Interface not registered in SSIS

Got the following error message when I make a new integration service projct

Failed to save package file "C:\Documents and Settings\Administrator\Local Settings\Temp\1\tmp2B.tmp" with error 0x80040155 "Interface not registered".


Just run these two commands from the command prompt:
regsvr32 msxml3.dll
regsvr32 msxml6.dll

Thursday, May 27, 2010

Wednesday, May 26, 2010

MAIL

--------------


Imports System.Net.Mail

sendmail(comments.text, body.text)
------------------


Private Sub sendmail(ByVal from As String, ByVal body As String)
Dim mailservername As String = "smtp.SASDED.com"
Dim message As MailMessage = New MailMessage(from, "", "Email from :: ASK US", body)
Dim mailclient As SmtpClient = New SmtpClient

mailclient.Host = mailservername
mailclient.Send(message)
message.Dispose()
End Sub

Monday, May 24, 2010

SUBST

Subst

Associates a path with a drive letter. Used without parameters, subst displays the names of the virtual drives in effect.

Syntax
subst [drive1: [drive2:]Path]

subst drive1: /d

Top of page
Parameters
drive1: : Specifies the virtual drive to which you want to assign a path.

drive2: : Specifies the physical drive that contains the specified path (if different from the current drive).

Path : Specifies the path that you want to assign to a virtual drive.

/d : Deletes a virtual drive.

/? : Displays help at the command prompt.

Top of page
Remarks
• The following commands do not work, or should not be used, on drives used in the subst command:

• chkdsk

• diskcomp

• diskcopy

• format

• label

• recover


• The drive1 parameter must be within the range specified by the lastdrive command. If not, subst displays the following error message:

Invalid parameter - drive1:


Top of page
Examples
To create a virtual drive Z for the path B:\User\Betty\Forms, type:

subst z: b:\user\betty\forms

Now, instead of typing the full path, you can reach this directory by typing the letter of the virtual drive, followed by a colon, as follows:

z:

Wednesday, April 28, 2010

Report Processing

Imports Microsoft.Reporting.WebForms
Dim datasourceid As New Microsoft.Reporting.WebForms.ReportDataSource
Dim strdatasource As String
Select Case op_level_selection.SelectedValue
Case 1
strdatasource = "reports/Main.rdlc"
With ReportViewer1
.Reset()
.ProcessingMode = ProcessingMode.Local
.LocalReport.ReportPath = strdatasource
.LocalReport.DataSources.Clear()
datasourceid.DataSourceId = "ods_main_data"
datasourceid.Name = "DS_MAIN"
.LocalReport.DataSources.Add(datasourceid)
.DocumentMapCollapsed = True
.LocalReport.Refresh()
.Visible = True
End With

Monday, April 19, 2010

If you aren't located in the US, you may be interested in another adjustment I've made to the tagset, that of the paper size. By default it is set to "0" which is interpreted as Undefined. For us, that results in it trying to print to "letter" sized paper which is only (I believe) used in the states. To set it to A4, you need to find the line:-

CODE
put '0' nl;
and change it to

CODE
put '9' nl;

Other valid papersize values and meanings are listed here:-

CODE
Paper Size Table
Index Paper type Paper size
----------------------------------------------------
0 Undefined
1 Letter 8 1/2" x 11"
2 Letter small 8 1/2" x 11"
3 Tabloid 11" x 17"
4 Ledger 17" x 11"
5 Legal 8 1/2" x 14"
6 Statement 5 1/2" x 8 1/2"
7 Executive 7 1/4" x 10 1/2"
8 A3 297mm x 420mm
9 A4 210mm x 297mm
10 A4 small 210mm x 297mm
11 A5 148mm x 210mm
12 B4 250mm x 354mm
13 B5 182mm x 257mm
14 Folio 8 1/2" x 13"
15 Quarto 215mm x 275mm
16 10" x 14"
17 11" x 17"
18 Note 8 1/2" x 11"
19 #9 Envelope 3 7/8" x 8 7/8"
20 #10 Envelope 4 1/8" x 9 1/2"
21 #11 Envelope 4 1/2" x 10 3/8"
22 #12 Envelope 4 3/4" x 11"
23 #14 Envelope 5" x 11 1/2"
24 C Sheet 17" x 22"
25 D Sheet 22" x 34"
26 E Sheet 34" x 44"
27 DL Envelope 110mm x 220mm
28 C5 Envelope 162mm x 229mm
29 C3 Envelope 324mm x 458mm
30 C4 Envelope 229mm x 324mm
31 C6 Envelope 114mm x 162mm
32 C65 Envelope 114mm x 229mm
33 B4 Envelope 250mm x 353mm
34 B5 Envelope 176mm x 250mm
35 B6 Envelope 125mm x 176mm
36 Italy Envelope 110mm x 230mm
37 Monarch Envelope 3 7/8" x 7 1/2"
38 6 3/4 Envelope 3 5/8" x 6 1/2"
39 US Standard Fanfold 14 7/8" x 11"
40 German Std. Fanfold 8 1/2" x 12"
41 German Legal Fanfold 8 1/2" x 13"

Thursday, April 15, 2010

rdlc code based DataSource

rdlc code based DataSource?
Skip_Frog
Okay I have the below code.

Dim da As SqlDataAdapter
Dim ds As DataSet
da = New SqlDataAdapter("Select Distinct [OP Number] from MasterShimSel", frmMain.sConn)
ds = New DataSet("Test")
da.Fill(ds, "Test")
Dim dsname As String = "ds"
Dim rs As New Microsoft.Reporting.WinForms.ReportDataSource(dsname, ds.Tables(0))
Me.ReportViewer1.LocalReport.DataSources.Add(rs)

http://www.windows-tech.info/15/8d7972f9bf31e44d.php http://www.windows-tech.info/

More Important Links

Followers