Results 1 to 2 of 2

Thread: Now W.T.F is happening?

  1. #1

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606

    Now W.T.F is happening?

    Hello,

    Since i upsize my Access DB to SQL, i'm having a weird problem
    with my app!

    at one point you can view all record for one client, it show
    an amount,date,notes and description.

    i have to different but very similar, CO(Change orders) and
    payment!

    they both have the same coding exept name changes,
    but now for some reason, on my payment one the amount
    does'nt show in my list!

    here's my codeing

    VB Code:
    1. Sub fillLst()
    2.     Dim x As Integer
    3.     lstCO.ListItems.Clear
    4.     strSQl = "SELECT * FROM tblCO WHERE coClientId=" & frmMain.lstClients.SelectedItem
    5.     Set rs = conn.Execute(strSQl)
    6.     If Not rs.EOF Then
    7.         retData = rs.GetRows()
    8.         fraCO.Caption = UBound(retData, 2) + 1 & " Records"
    9.         For x = 0 To UBound(retData, 2)
    10.             Set newitem = lstCO.ListItems.Add(Text:=retData(0, x))
    11.                 If Trim(retData(3, x)) = "" Or IsNull(retData(3, x)) Then
    12.                     newitem.SubItems(1) = retData(3, x)
    13.                 Else
    14.                     newitem.SubItems(1) = FormatCurrency(retData(3, x), 2, vbUseDefault, vbFalse)
    15.                 End If
    16.                 newitem.SubItems(2) = retData(4, x) & ""
    17.                 newitem.SubItems(3) = retData(2, x) & ""
    18.         Next
    19.         cmdEditCO.Enabled = True
    20.         cmdDeleteCO.Enabled = True
    21.         cmdPrintCO.Enabled = True
    22.     Else
    23.         cmdEditCO.Enabled = False
    24.         cmdDeleteCO.Enabled = False
    25.         cmdPrintCO.Enabled = False
    26.     End If
    27.     Set rs = Nothing
    28. End Sub

    if i do a F8, retData(3, x) is always empty, when it should'nt!
    but if i do msgbox rs("coPrice") just before retData = rs.GetRows(),
    i see the amount, or if i do rs.requery before retData = rs.GetRows(), i see all the amount but not the notes!!!!

    that is friggin weird, what happening!

  2. #2

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    ok, i finally find out hte source of my problem

    if i use this connection string

    conn.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=landarkSQL;Initial Catalog=landarkSQL;Data Source=222.111.666.244;Connect Timeout=15", "landarkSQL", "myPassword"

    everything works great

    but the proble is when i use this one, with my dsn

    conn.Open "DSN=landark;UID=landarkSQL;PWD=myPassword;"

    is it the connection time out or the persist security info ??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width