checkbox senaryolarında (true / false) public değişkeninden
dataclass'a aktarılan veri kaynağını çekemediğim için connection
olamıyor.
bu yüzden DataClass için en üstte tanımlayabileceğim public
değişkenine ihtiyacım olacak. giriş butonlarında sorgular da bu yüzden
çalışmıyor.
şöyle bir yol izledim ancak olmadı.
Imports System.Linq
Imports System.Configuration
Public Class loginFrm
Public baglanti As DataClasses1DataContext
'-------------------------------------------------
'arada diğer yordamlar
'load olayını incelersek
Private Sub loginFrm_Load(sender As System.Object, e As
System.EventArgs) Handles MyBase.Load
Try
Dim BaglantiMetni As String = String.Empty
If baglantiTuru.Checked = True Then
'uzak baglanti secili ise
BaglantiMetni =
ConfigurationManager.ConnectionStrings("DYS.My.MySettings.UzakConnectionString").ConnectionString
Dim baglanti2 As New
DataClasses1DataContext(BaglantiMetni)
baglanti2 = baglanti
'personel verileri doldur
Else
'yerel baglanti secili ise
BaglantiMetni =
ConfigurationManager.ConnectionStrings("DYS.My.MySettings.LocalConnectionString").ConnectionString
Dim baglanti2 As New
DataClasses1DataContext(BaglantiMetni)
baglanti2 = baglanti
'personel verilerini doldur
End If
Catch ex As Exception
MessageBox.Show("Veri Tabanı Bağlantısı Kurulamadı" &
Chr(13) & "Lütfen Sistem yöneticinize başvurun.", "Veri Tabanı
Bağlantı Hatası", MessageBoxButtons.OK, MessageBoxIcon.Warning)
End Try
End Sub
nerede hata yapıyorum ?
--
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net