P
PGM
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim Projname, ProjSpon As String
Dim AppName, AppType, AppSupp, AppDesc As String
Dim VendName, VendPhone As String
Dim ReqName, ReqPurp As String
Dim BudgItem, BudgNum As String
Dim BudgOnly As Integer
If chkBudg.Checked = True Then BudgOnly = 1 Else BudgOnly = 0
Projname = Convert.ToString(txtProjName.Text)
ProjSpon = Convert.ToString(txtProjSpon.Text)
AppNAme = Convert.ToString(txtAppName.Text)
VendName = Convert.ToString(txtVendName.Text)
VendPhone = Convert.ToString(txtVendPhone.Text)
AppType = Convert.ToString(cmbAppType.SelectedItem)
AppSupp = Convert.ToString(cmbAppSupp.SelectedItem)
AppDesc = Convert.ToString(txtAppDes.Text)
ReqName = Convert.ToString(txtReqName.Text)
ReqPurp = Convert.ToString(cmbReqPurp.SelectedItem)
BudgItem = Convert.ToString(cmbBudgetItem.SelectedItem)
BudgNum = Convert.ToString(txtbudgetNum.Text)
Dim strSQL As String
Dim strConn As String
strSQL = "Insert Into system.ServerRequest Values('" & BudgOnly & "','" &
Projname & "','" & ProjSpon & "','" & AppName & "','" & VendName & "','" &
VendPhone & "','" & AppType & "','" & AppSupp & "','" & AppDesc & "','" &
ReqName & "','" & ReqPurp & "','" & BudgItem & "','" & BudgNum & "')"
MsgBox("SQL:" & strSQL)
strConn = "Provider=SQLOLEDB.1;Password=vbuser;Persist Security
Info=True;User ID=VBuser;Initial Catalog=Masterserver;Data
Source=patmtest\sqlexpress"
MyConnObj = New ADODB.Connection
MyConnObj.Open(strConn)
SQLcmd = New ADODB.Command
SQLcmd.ActiveConnection = MyConnObj
SQLcmd.CommandText = strSQL
SQLcmd.Execute()
MyConnObj.Close()
MyConnObj = Nothing
System.EventArgs) Handles Button1.Click
Dim Projname, ProjSpon As String
Dim AppName, AppType, AppSupp, AppDesc As String
Dim VendName, VendPhone As String
Dim ReqName, ReqPurp As String
Dim BudgItem, BudgNum As String
Dim BudgOnly As Integer
If chkBudg.Checked = True Then BudgOnly = 1 Else BudgOnly = 0
Projname = Convert.ToString(txtProjName.Text)
ProjSpon = Convert.ToString(txtProjSpon.Text)
AppNAme = Convert.ToString(txtAppName.Text)
VendName = Convert.ToString(txtVendName.Text)
VendPhone = Convert.ToString(txtVendPhone.Text)
AppType = Convert.ToString(cmbAppType.SelectedItem)
AppSupp = Convert.ToString(cmbAppSupp.SelectedItem)
AppDesc = Convert.ToString(txtAppDes.Text)
ReqName = Convert.ToString(txtReqName.Text)
ReqPurp = Convert.ToString(cmbReqPurp.SelectedItem)
BudgItem = Convert.ToString(cmbBudgetItem.SelectedItem)
BudgNum = Convert.ToString(txtbudgetNum.Text)
Dim strSQL As String
Dim strConn As String
strSQL = "Insert Into system.ServerRequest Values('" & BudgOnly & "','" &
Projname & "','" & ProjSpon & "','" & AppName & "','" & VendName & "','" &
VendPhone & "','" & AppType & "','" & AppSupp & "','" & AppDesc & "','" &
ReqName & "','" & ReqPurp & "','" & BudgItem & "','" & BudgNum & "')"
MsgBox("SQL:" & strSQL)
strConn = "Provider=SQLOLEDB.1;Password=vbuser;Persist Security
Info=True;User ID=VBuser;Initial Catalog=Masterserver;Data
Source=patmtest\sqlexpress"
MyConnObj = New ADODB.Connection
MyConnObj.Open(strConn)
SQLcmd = New ADODB.Command
SQLcmd.ActiveConnection = MyConnObj
SQLcmd.CommandText = strSQL
SQLcmd.Execute()
MyConnObj.Close()
MyConnObj = Nothing