VB.Net dataset designer cannot regenerate designer code

Try the following:

1) Click on the XSD file in the solution explorer
2) Click on the properties tab and check the Custom Tool Property. In there you should find MSDataSetGenerator. If it’s not there, type it there
3) Once done right click the XSD file and click the menu item Run Custom Tool.


Posted in Pemrograman, VB.NET | Tagged , | Leave a comment

VB.NET Dataset designer generated dataset1.designer

delete all the ds*.designer.vb, don’t worry because it can be regenerated.

Close your project. Edit the project.vbproj file in XML mode. You will find an entry in the group that reads:

<None Include="*myDataSet*.xsd">

Change the item to remove the “1”. Save and close the file. Reopen your project.

When you regenerate your dataset, it should be back to normal.

Posted in IT, Pemrograman, VB.NET | Tagged , | Leave a comment

VB.NET – Cetak dengan custom paper size menggunakan crystal report viewer.

Tutorial Level : Intermediate -> Advanced

Berikut langkah-langkah untuk mencetak laporan dengan ukuran kertas yang kita tentukan.

Spesifikasi Computer Admin:

  • OS Windows 7
  • Visual Studio 11 / Visual Studio 2012
  • Crystal Report 13_0_5
  • Printer : EPSON L355 Series

Langkah 1 – Set terlebih dahulu ukuran kertas.

Klik Start > Devices and Printers > Print Server Properties

Create form baru dengan nama “TTH” kemudian save form.


Langkah 2 – Coding pencetakan laporan

Buat sebuah public function untuk menentukan ukuran kertas

Public Function GetPapersizeID(ByVal PrinterName As String, ByVal PaperSizeName As String) As Integer
	Dim doctoprint As New System.Drawing.Printing.PrintDocument()
	Dim PaperSizeID As Integer = 0
	Dim ppname As String = ""
	Dim s As String = ""
	doctoprint.PrinterSettings.PrinterName = PrinterName '(ex."EpsonSQ-1170ESC/P2")
	For i As Integer = 0 To doctoprint.PrinterSettings.PaperSizes.Count - 1
		Dim rawKind As Integer
		ppname = PaperSizeName
		If doctoprint.PrinterSettings.PaperSizes(i).PaperName = ppname Then
			rawKind = CInt(doctoprint.PrinterSettings.PaperSizes(i).GetType().GetField("kind",
			Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic).GetValue(doctoprint.PrinterSettings.PaperSizes(i)))
			PaperSizeID = rawKind
			Exit For
		End If
	Return PaperSizeID
End Function

Sisipkan coding berikut ke dalam tombol cetak.

Dim repOptions As CrystalDecisions.CrystalReports.Engine.PrintOptions
With rptDocument
	repOptions = .PrintOptions
	With repOptions
		.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Portrait
		.PaperSize = GetPapersizeID("EPSON L355 Series", "TTH")
		.PrinterName = "EPSON L355 Series"
	End With
' Set the Report Option first before loading the report or else settings won't take effect
	.Load(path, CrystalDecisions.Shared.OpenReportMethod.OpenReportByDefault)
	.PrintToPrinter(1, True, 0, 0)
End With

Semoga Membantu. Tq

Aside | Posted on by | Tagged , , , | 2 Comments

MSCOMCTL could not loaded to path on Win 7 64bit

Today, I suddenly run into a problem on my VB6 (32bit) project, suddenly when i look into the log file i found an error MScomctllib could not loaded to path.

After several minutes googling and hasn’t found the solution, i tried to register back the ocx. and fortunately it works!

so the step is:

  • Open the cmd in administrator mode
  • then go to C:\windows\system32
  • and enter the magic code: regsvr32 MSCOMCTL.OCX


Hope it can help other that has same problem.

Good Luck

Posted in Information, IT | Tagged , , , , | Leave a comment

Access 2007 (32-Bit) Link to Oracle Database Using Microsoft ODBC for Oracle Driver on Windows 7 (64-Bit)

When we want to create link to table oracle using access 2007 x86 on Win 7 x64. We must setting several properties:

1. Setting Data Source (ODBC) to Target in sysWOW64:

  • Open Control Panel > Administrative Tools > Right Click Data Source (ODBC) > Properties > Change the Target and Start In to %windir%\syswow64\odbcad32.exe like following pictures:


Then another problem is that MS Access 2007 on Windows 7 (64-bit version) is by default installed in the following folder:  C:\Program Files (x86)\Microsoft Office\Office12, and the Microsoft ODBC for Oracle driver doesn’t work properly with the parentheses in the path.  The solution is create a symlink to the folder Access is installed in, and then launching Access from that location.

2. Set up a symlink to the c:\Program Files (x86) folder without the parentheses:

  • Select the Windows button:  Start -> All Programs -> Accessories
  • Scroll down to Command Prompt, and right-click and select “Run as administrator”
  • At the command prompt, enter the following:  mklink /D “C:\Program Files x86” “C:\Program Files (x86)”
  • You should get back:  symbolic link created for C:\Program Files x86 <<===>> C:\Program Files (x86)


3. For convenience, create a desktop shortcut to the new no-parentheses path to Access

  • Launch Windows Explorer (quick launch is Windows key, and press E), and navigate to C:\Program Files x86\Microsoft Office\Office12
  • Scroll to MSACCESS, right-click, and select “Create Shortcut”
  • A dialog will appear, saying it “…cannot create a shortcut here, and ask if you would like one placed on the desktop instead?”  Click Yes.
  • Go to the desktop (quick launch is Windows key, and press D), and rename the shortcut so you can better remember why it’s there
  • Select the shortcut
  • Right-click, and select rename
  • Rename to “MSAccess for Oracle”

4. Finally, create a MS Access database with a link to an Oracle table

  • Double-click the “MSAccess for Oracle” desktop shortcut
  • Select new blank database, and give it a name, I chose “OracleDb.accdb”
  • Select External Data -> More -> ODBC Database


  • Select “Link to the data source by creating a linked table.”
  • In the “Select Data Source” dialog, select the “Machine Data Source” tab, and select the data source you just created (mine was “Oracle”), and hit OK
  • Another dialog will appear, Microsoft ODBC for Oracle Connect
  • Enter for the User Name:  <Username>
  • Enter for the Password:  <whatever password you chose for SYS and SYSTEM when you installed Oracle 10G>
  • Leave blank Server: <server name>
  • Another “Link Tables” dialog will appear, choose whatever is appropriate


That’s finish the tutorial, Good Luck

Reference : http://social.msdn.microsoft.com/Forums/office/en-US/fee3f1db-7d4e-4e36-918d-5f7d3e6821c7/on-windows-7-64bit-how-to-use-ms-access-2007-to-link-to-oracle-10g-tables-and-not-get-ora06413?forum=accessdev

Posted in DBA, Information, IT | Tagged , , , , , , , | Leave a comment

VB.NET 2010 connect to sql server 2000 using ole db on win 7 64bit

When using VB.NET 2010 to connect to SQL SERVER 2000 Database that secure with password using OLE DB we can use this following connection string:

Provider=SQLOLEDB;Data Source=<server instance name>;Password=<password>;User ID=<user>;Initial Catalog=<databaseName>


Public conSql As New OleDbConnection
Public conStrSqlServer As String = “Provider=SQLOLEDB;Data Source=<server instance name>;Password=<password>;User ID=<user>;Initial Catalog=<databaseName>”

conSql.ConnectionString = conStrSqlServer

The main point if you use win 7 64 bit is don’t forget to set your debug platform to x86 or you will find an error.


Posted in DBA, IT, Pemrograman, VB.NET | Tagged , , , , , , | Leave a comment

Understanding Permission 644, 444, 777

4 is read
5 is read/execute (execute is always needed for directories)
6 is read/write
7 is read, write, and execute 

The first number is Owner, the second is Group, and the third is Other.  Thus 644 is 
Read Read Read

Posted in Information, IT | Tagged , , , , , | Leave a comment