I got these errors and I do not know what it is.
here is my code:
T^hank you in advance, please I need help in this small project
Exception thrown: 'System.NotImplementedException' in Appoinments.dll
'Appoinments.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\5.0.17\System.Diagnostics.StackTrace.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Appoinments.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\5.0.17\System.Reflection.Metadata.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Appoinments.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\5.0.17\System.IO.FileSystem.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Appoinments.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\5.0.17\System.Collections.Immutable.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Appoinments.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\5.0.17\System.Text.Encoding.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The program '[16696] Appoinments.exe' has exited with code -1 (0xffffffff).
here is my code:
VB.NET:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class Form1
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
Friend WithEvents Button1 As Button
Private Sub Form1_Load(sender As Object, e As EventArgs)
End Sub
'Private Sub Button1_Click(sender As Object, e As EventArgs)
'Imports System.Data.SqlClient
Private Sub btnCreateDatabase_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click
Dim str As String
Dim myConn As SqlConnection = New SqlConnection("Server=(local)\netsdk;" &
"uid=sa;pwd=;database=master")
str = "CREATE DATABASE MyDatabase ON PRIMARY " &
"(NAME = MyDatabase_Data, " &
" FILENAME = 'C:\Appoinment\Appoinments.mdf', " &
" SIZE = 2MB, " &
" MAXSIZE = 10MB, " &
" FILEGROWTH = 10%) " &
" LOG ON " &
"(NAME = MyDatabase_Log, " &
" FILENAME = 'C:\Appoinment\Appoinments.ldf', " &
" SIZE = 1MB, " &
" MAXSIZE = 5MB, " &
" FILEGROWTH = 10%) "
Dim myCommand As SqlCommand = New SqlCommand(str, myConn)
Try
myConn.Open()
myCommand.ExecuteNonQuery()
MessageBox.Show("Database is created successfully",
"MyProgram", MessageBoxButtons.OK,
MessageBoxIcon.Information)
Catch ex As Exception
MessageBox.Show(ex.ToString())
Finally
If (myConn.State = ConnectionState.Open) Then
myConn.Close()
End If
End Try
End Sub
Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button()
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(316, 139)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(239, 69)
Me.Button1.TabIndex = 0
Me.Button1.Text = "Create Database"
Me.Button1.UseVisualStyleBackColor = True
'
'Form1
'
Me.BackColor = System.Drawing.SystemColors.InactiveCaption
Me.ClientSize = New System.Drawing.Size(642, 378)
Me.Controls.Add(Me.Button1)
Me.Font = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point)
Me.ForeColor = System.Drawing.SystemColors.HotTrack
Me.Name = "Form1"
Me.Text = "Create Database"
Me.ResumeLayout(False)
End Sub
Private Sub Form1_Load_1(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
End Class
T^hank you in advance, please I need help in this small project
Last edited by a moderator: