Compare commits

...

2 Commits

Author SHA1 Message Date
79443856c5 increment PW 2021-08-13 11:01:28 -04:00
d78f665533 upload product groups 2021-08-13 11:01:12 -04:00
2 changed files with 27 additions and 3 deletions

23
FL.bas
View File

@ -1673,10 +1673,31 @@ Sub nursery_parse()
End Sub
Sub convert_to_value()
Dim c As Object
For Each c In Selection.Cells
If IsNumeric(c.value) Then c.value = CDbl(c.value)
Next c
End Sub
Sub pricegroup_upload()
Dim sql As String
Selection.CurrentRegion.Select
sql = x.SQLp_build_sql_values(x.ARRAYp_get_range_string(Selection), True, True, PostgreSQL, False)
sql = "BEGIN;" & vbCrLf & "DELETE FROM rlarp.price_map;" & vbCrLf & "INSERT INTO rlarp.price_map" & vbCrLf & sql & ";" & vbCrLf & "Commit;"
If Not x.ADOp_Exec(0, sql, 1, True, PostgreSQLODBC, "usmidlnx01", False, "ptrowbridge", "qqqx53!030", "Port=5030;Database=ubm") Then
MsgBox (x.ADOo_errstring)
Else
MsgBox ("Upload Complete")
End If
Call x.ADOp_CloseCon(0)
End Sub

View File

@ -13,6 +13,7 @@ Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public proceed As Boolean
Private pl() As String
Private plv() As Variant
@ -110,7 +111,7 @@ Private Sub UserForm_Initialize()
' End If
' End If
If Not FL.x.ADOp_OpenCon(1, ISeries, "S7830956", False, "PTROWBRIDG", "QQQX53@042") Then
If Not FL.x.ADOp_OpenCon(1, ISeries, "S7830956", False, "PTROWBRIDG", "QQQX53@046") Then
MsgBox (FL.x.ADOo_errstring)
Exit Sub
End If
@ -124,6 +125,8 @@ Private Sub UserForm_Initialize()
plfv = FL.x.TBLp_StringToVar(FL.x.TBLp_Transpose(pl))
cbLIST.list = plv
lbLIST.list = plfv
@ -168,7 +171,7 @@ Sub load_lists()
' End If
' End If
If Not FL.x.ADOp_OpenCon(1, ISeries, "S7830956", False, "PTROWBRIDG", "QQQX53@042") Then
If Not FL.x.ADOp_OpenCon(1, ISeries, "S7830956", False, "PTROWBRIDG", "QQQX53@046") Then
MsgBox (FL.x.ADOo_errstring)
Exit Sub
End If