|
-
Sep 19th, 2000, 04:19 AM
#1
Thread Starter
Addicted Member
Does anyone know if there are any bugs with this driver. I have just switched from using a SQL Server Driver to this one and my code is no longer fully working....
It connects to the DB but does not pull out a RecordSet....
Any Advice.
-
Sep 19th, 2000, 08:44 AM
#2
Addicted Member
What SQL Server is it? Microsoft or Sybase? Could you elaborate...
-
Sep 19th, 2000, 11:18 AM
#3
Thread Starter
Addicted Member
Sybase
Thanks for looking this up.
Its a Sybase DB using the INTERSOLVE 3.11, 32 bit Sybase Driver.
The code was working fine with the SQL Server driver before, the connection object is established but no recordset is being generated. I think it may have something to do with the store procedure.
Would you like me to forward my code.
Thank you
-
Sep 19th, 2000, 12:51 PM
#4
Addicted Member
Sure. Let us have a look at it and see what we can do.
-
Sep 20th, 2000, 03:06 AM
#5
Thread Starter
Addicted Member
Here we go:
Hi thanks for replying, I have pasted the code below, if you would like me to email to you pls let me know.
Here we go:::
-----------------
main module
Sub Intialise()
Dim ADOcon As ADODB.Connection
Dim ADOcmd As ADODB.Command
Dim ADOrs As ADODB.Recordset
Dim strSQL As String
Set ADOcon = New ADODB.Connection
ADOcon.ConnectionString = ODBCDSN
ADOcon.ConnectionTimeout = 60
ADOcon.Open
Set ADOcmd = New ADODB.Command
ADOcmd.ActiveConnection = ADOcon
strSQL = "SELECT Company FROM eqt_Company WHERE cuc = 1 ORDER BY UPPER(COMPANY_NAME)"
ADOcmd.CommandText = strSQL
Set ADOrs = ADOcmd.Execute(strSQL)
Do
SniffIt.cbStock.AddItem ADOrs(0)
ADOrs.MoveNext
Loop Until ADOrs.EOF
ADOcon.Close
xlApp.Quit
End Sub
----------------------------
User_form code
Private Sub cbRIC_Change()
SniffIt.cbStock.ListIndex = SniffIt.cbRIC.ListIndex
End Sub
Private Sub cbRIC_Click()
SniffIt.cbStock.ListIndex = SniffIt.cbRIC.ListIndex
End Sub
Private Sub cbStock_Change()
SniffIt.cbRIC.ListIndex = SniffIt.cbStock.ListIndex
Tools.PopulateSnifferOnStock (SniffIt.cbStock)
SniffIt.optStock = True
End Sub
Private Sub cbStock_Click()
SniffIt.cbRIC.ListIndex = SniffIt.cbStock.ListIndex
Tools.PopulateSnifferOnStock (SniffIt.cbStock)
SniffIt.optType(0) = True
End Sub
Private Sub cmAddRecord_Click()
'assign non-null values
'
End Sub
'Private Sub cmClose_Click()
' End
'End Sub
Private Sub cmAddRelated_Click()
On Error Resume Next
If Trim(SniffIt.cbRelatedStocks) <> "" Then
SniffIt.lbRelatedStocks.AddItem SniffIt.cbRelatedStocks
SniffIt.cbRelatedStocks.RemoveItem (SniffIt.cbRelatedStocks.ListIndex)
End If
On Error GoTo 0
End Sub
Private Sub cmRemove_Click()
On Error Resume Next
SniffIt.lbRelatedStocks.RemoveItem (SniffIt.lbRelatedStocks.ListIndex)
On Error GoTo 0
End Sub
Private Sub optFilm_Click()
Case Is = Film
End Sub
Private Sub optHootRecording_Click()
Case Is = HootRecording
End Sub
Private Sub ResearchLive_Click()
Case Is = ResearchLive
End Sub
Private Sub VoiceBlast_Click()
Case Is = VoiceBlast
End Sub
Private Sub optMorningCall_Click()
Case Is = MorningCall
End Sub
'Private Sub Form_Load()
' InitiateSniffer
'End Sub
----------------------------------------
The above is just what i have done so far. The user form i am playing around.
Cheers,
Rocks
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
|