some problem need help as i just started VB.net
i have some problem and i am not sure with my approach. can any one help me out.
my solution has Sub Main as startup
Code:
Module Mod_Main
Public Sub Main()
g_strAppDir = Application.ExecutablePath
Dim frm As New Frm_Logon()
frm.Show()
Application.Run()
End Sub
......
when i use only frm.Show() disapper after show. so i have used Application.Run() what can be the problem and using Application.Run() is correct.?
now we can create Dataset in diff way i have choose one
i have created .xsd and .vb file using vs for dataset.
i did by adding a dataset component and defining the structure and relation
i have a sub Init_DataSet() for loading the data... but seem to have some problem is my approach correct...
Code:
Public Sub Init_DataSet()
Try
Cn.Close()
Dim OIT_Folder_SelectCmd As New SqlClient.SqlCommand("select * from OIT_FOLDER", Cn)
Dim OIT_Folder_UpdateCmd As SqlClient.SqlCommand
Dim OIT_Folder_Adapter As SqlClient.SqlDataAdapter
Dim OIT_File_SelectCmd As New SqlClient.SqlCommand("select * from OIT_File", Cn)
Dim OIT_File_UpdateCmd As SqlClient.SqlCommand
Dim OIT_File_Adapter As SqlClient.SqlDataAdapter
Dim OIT_Permissions_SelectCmd As New SqlClient.SqlCommand("select * from OIT_Permissions", Cn)
Dim OIT_Permissions_UpdateCmd As SqlClient.SqlCommand
Dim OIT_Permissions_Adapter As SqlClient.SqlDataAdapter
OIT_Folder_Adapter.SelectCommand = OIT_Folder_SelectCmd
Cn.Open()
OIT_Folder_Adapter.Fill(g_Ds, "OIT_Folder")
'OIT_File_Adapter.SelectCommand = OIT_File_SelectCmd
'OIT_File_Adapter.Fill(g_Ds, "OIT_File")
'OIT_Permissions_Adapter.SelectCommand = OIT_Permissions_SelectCmd
'OIT_Permissions_Adapter.Fill(g_Ds, "OIT_Permissions")
Catch e As Exception
MsgBox(e.Message)
End Try
End Sub
and when i execute the Init_DataSet() sub i got some waring not sure what are there....
Could not copy temporary files to the output directory.
The file 'OrganiseIT.NET.exe' cannot be copied to the run directory. The process cannot access the file because it is being used by another process.
The file 'OrganiseIT.NET.pdb' cannot be copied to the run directory. The process cannot access the file because it is being used by another process.
[/CODE]