|
-
Jun 6th, 2002, 09:36 AM
#1
Thread Starter
Frenzied Member
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:
Sub fillLst()
Dim x As Integer
lstCO.ListItems.Clear
strSQl = "SELECT * FROM tblCO WHERE coClientId=" & frmMain.lstClients.SelectedItem
Set rs = conn.Execute(strSQl)
If Not rs.EOF Then
retData = rs.GetRows()
fraCO.Caption = UBound(retData, 2) + 1 & " Records"
For x = 0 To UBound(retData, 2)
Set newitem = lstCO.ListItems.Add(Text:=retData(0, x))
If Trim(retData(3, x)) = "" Or IsNull(retData(3, x)) Then
newitem.SubItems(1) = retData(3, x)
Else
newitem.SubItems(1) = FormatCurrency(retData(3, x), 2, vbUseDefault, vbFalse)
End If
newitem.SubItems(2) = retData(4, x) & ""
newitem.SubItems(3) = retData(2, x) & ""
Next
cmdEditCO.Enabled = True
cmdDeleteCO.Enabled = True
cmdPrintCO.Enabled = True
Else
cmdEditCO.Enabled = False
cmdDeleteCO.Enabled = False
cmdPrintCO.Enabled = False
End If
Set rs = Nothing
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!
-
Jun 6th, 2002, 10:25 AM
#2
Thread Starter
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|