upload product groups

This commit is contained in:
Paul Trowbridge 2021-08-13 11:01:12 -04:00
parent 34984de260
commit d78f665533

23
FL.bas
View File

@ -1673,10 +1673,31 @@ Sub nursery_parse()
End Sub End Sub
Sub convert_to_value() Sub convert_to_value()
Dim c As Object
For Each c In Selection.Cells For Each c In Selection.Cells
If IsNumeric(c.value) Then c.value = CDbl(c.value) If IsNumeric(c.value) Then c.value = CDbl(c.value)
Next c Next c
End Sub 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