|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Run-time '-2147217904(80040e10)'
Hi All,
I need some help, when i am running my code (VB6) i get error message "Run-time '-2147217904(80040e10)'". This is example of my code : oSQL = "SELECT PriceBook.Cuid,PriceBook.CustName,PriceBook.ShipID ,PriceBook.Shipname,PriceBook.Itemnumber,PriceBook .ItemnName," oSQL = oSQL & "PriceBook.From,PriceBook.To,PriceBook.Price,PriceB ook.In,PriceBook.Out FROM PriceBook Order By PriceBook.CUID" oRecord2.CursorLocation = adUseClient oRecord2.Open oSQL, oConn2, adOpenStatic, adLockReadOnly Regards Me |
|
#2
|
|||
|
|||
|
What line of code is generating the error?
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
'Add the Reference "Microsoft ActiveX Data Objects Library 2.6"
'Add the Component "Microsoft ADO Data Control 6.0 (SP4) (OLEDB)" Dim rstRecordSet As New ADODB.Recordset Dim cnConnection As New ADODB.Connection Dim strConnectionString As String Dim strServerName As String Dim strDatabaseName As String Dim strUserName As String Dim strPassword As String strServerName = "JDARDEN" strDatabaseName = "TEST" strUserName = "SA" strPassword = "PASSWORD" '************************************************* ************************************************** 'All of this goes on one line '************************************************* ************************************************** strConnectionString = "Provider=SQLOLEDB.1;Password=" & strPassword & ";Persist Security Info=True;User ID=" & strUserName & ";Initial Catalog=" & strDatabaseName & ";Data Source=" & strServerName & "" '************************************************* ************************************************** cnConnection.ConnectionString = strConnectionString cnConnection.Open '************************************************* ************************************************** 'All of this goes on one line '************************************************* ************************************************** rstRecordSet.Open "SELECT PriceBook.Cuid, PriceBook.CustName, PriceBook.ShipID, PriceBook.Shipname, PriceBook.Itemnumber, PriceBook.ItemnName, PriceBook.From, PriceBook.To, PriceBook.Price, PriceBook.In, PriceBook.Out FROM PriceBook Order By PriceBook.CUID", cnConnection, adOpenStatic, adLockReadOnly '************************************************* ************************************************** |
|
#4
|
|||
|
|||
|
Just a thought....I get this error when I have a previous connection string still hanging out there open. Make sure it is a NEW, free connection you are opening
![]() kristin |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Run-time '-2147217904(80040e10)' |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|