Hello,
Can you hale me to define my mistake please?
I am trying to run a SQL Pass – Through Query from Access 2000 and
inside the record set I am trying to loop for a LoginID. I think
that this function should work.
I get an error at this point Set StoredProcRecor dSet =
DB.OpenRecordse t(StoredProcQry Name, DB_OPEN_SNAPSHO T)
The error is this ODBC--call failed.
Please let me know how can I fix this.
Thank you very much.
Tina
Function GetFullReportCC ListServer(MyUn it_Name As String)
Dim StoredProcName As String
Dim StoredProcCall As String
Dim StoredProcQryNa me As String
Dim StoredProcQuery Def As QueryDef
Dim StoredProcRecor dSet As Recordset
Dim DB As Database
On Error GoTo HandleErr
Set DB = DBEngine.Worksp aces(0).Databas es(0)
StoredProcQryNa me = "qryGetFullRepo rtCCList"
StoredProcCall = "execute sp_GetFullRepor tCCList '" & MyUnit_Name
& "'"
Set StoredProcQuery Def = DB.QueryDefs(St oredProcQryName )
StoredProcQuery Def.Sql = StoredProcCall
Set StoredProcRecor dSet = DB.OpenRecordse t(StoredProcQry Name,
DB_OPEN_SNAPSHO T)
StoredProcRecor dSet.MoveFirst
Do Until StoredProcRecor dSet.EOF
GetFullReportCC ListServer = GetFullReportCC ListServer &
StoredProcRecor dSet.Fields("Lo ginID") & ";"
StoredProcRecor dSet.MoveNext
Loop
GetFullReportCC ListServer = Left$(GetFullRe portCCListServe r,
Len(GetFullRepo rtCCListServer) - 1)
ExitHere:
Set StoredProcRecor dSet = Nothing
Exit Function
End Function 7 6158
Replace Dim StoredProcQuery Def As QueryDef Dim StoredProcRecor dSet As Recordset Dim DB As Database
by
Dim StoredProcQuery Def As DAO.QueryDef
Dim StoredProcRecor dSet As DAO.Recordset
Dim DB As DAO.Database
Will usually cure the case.
Kindly repost if it doesn't.
Krgrds,
Perry
"tina" <Ti******@hotma il.com> wrote in message
news:69******** *************** ***@posting.goo gle.com... Hello, Can you hale me to define my mistake please? I am trying to run a SQL Pass - Through Query from Access 2000 and inside the record set I am trying to loop for a LoginID. I think that this function should work. I get an error at this point Set StoredProcRecor dSet = DB.OpenRecordse t(StoredProcQry Name, DB_OPEN_SNAPSHO T)
The error is this ODBC--call failed.
Please let me know how can I fix this. Thank you very much.
Tina
Function GetFullReportCC ListServer(MyUn it_Name As String)
Dim StoredProcName As String Dim StoredProcCall As String Dim StoredProcQryNa me As String Dim StoredProcQuery Def As QueryDef Dim StoredProcRecor dSet As Recordset
Dim DB As Database
On Error GoTo HandleErr Set DB = DBEngine.Worksp aces(0).Databas es(0)
StoredProcQryNa me = "qryGetFullRepo rtCCList" StoredProcCall = "execute sp_GetFullRepor tCCList '" & MyUnit_Name & "'"
Set StoredProcQuery Def = DB.QueryDefs(St oredProcQryName ) StoredProcQuery Def.Sql = StoredProcCall
Set StoredProcRecor dSet = DB.OpenRecordse t(StoredProcQry Name, DB_OPEN_SNAPSHO T)
StoredProcRecor dSet.MoveFirst
Do Until StoredProcRecor dSet.EOF
GetFullReportCC ListServer = GetFullReportCC ListServer & StoredProcRecor dSet.Fields("Lo ginID") & ";" StoredProcRecor dSet.MoveNext
Loop
GetFullReportCC ListServer = Left$(GetFullRe portCCListServe r, Len(GetFullRepo rtCCListServer) - 1)
ExitHere:
Set StoredProcRecor dSet = Nothing
Exit Function End Function
If that were the problem, I don't think the error message would say "ODBC call
failed".
On Tue, 27 Jan 2004 19:30:50 +0100, "Perry" <p.****@chello. nl> wrote: Replace Dim StoredProcQuery Def As QueryDef Dim StoredProcRecor dSet As Recordset Dim DB As Database by Dim StoredProcQuery Def As DAO.QueryDef Dim StoredProcRecor dSet As DAO.Recordset Dim DB As DAO.Database
Will usually cure the case. Kindly repost if it doesn't.
Krgrds, Perry
"tina" <Ti******@hotma il.com> wrote in message news:69******* *************** ****@posting.go ogle.com... Hello, Can you hale me to define my mistake please? I am trying to run a SQL Pass - Through Query from Access 2000 and inside the record set I am trying to loop for a LoginID. I think that this function should work. I get an error at this point Set StoredProcRecor dSet = DB.OpenRecordse t(StoredProcQry Name, DB_OPEN_SNAPSHO T)
The error is this ODBC--call failed.
Please let me know how can I fix this. Thank you very much.
Tina
Function GetFullReportCC ListServer(MyUn it_Name As String)
Dim StoredProcName As String Dim StoredProcCall As String Dim StoredProcQryNa me As String Dim StoredProcQuery Def As QueryDef Dim StoredProcRecor dSet As Recordset
Dim DB As Database
On Error GoTo HandleErr Set DB = DBEngine.Worksp aces(0).Databas es(0)
StoredProcQryNa me = "qryGetFullRepo rtCCList" StoredProcCall = "execute sp_GetFullRepor tCCList '" & MyUnit_Name & "'"
Set StoredProcQuery Def = DB.QueryDefs(St oredProcQryName ) StoredProcQuery Def.Sql = StoredProcCall
Set StoredProcRecor dSet = DB.OpenRecordse t(StoredProcQry Name, DB_OPEN_SNAPSHO T)
StoredProcRecor dSet.MoveFirst
Do Until StoredProcRecor dSet.EOF
GetFullReportCC ListServer = GetFullReportCC ListServer & StoredProcRecor dSet.Fields("Lo ginID") & ";" StoredProcRecor dSet.MoveNext
Loop
GetFullReportCC ListServer = Left$(GetFullRe portCCListServe r, Len(GetFullRepo rtCCListServer) - 1)
ExitHere:
Set StoredProcRecor dSet = Nothing
Exit Function End Function
I can't tell you what the cause of error is, but I can tell you how to find
out more about it.
When you use DAO, and an error is returned from the server or from the ODBC
library, a number of errors are generated, but VB gets only the last one which
is the least informative, and always just says "ODBC call failed". The whole
list of errors is stored in the DAO Errors collection, though, so you just
need to look at Errors(0).Descr iption (I think that's right, it might be 1,
not zero) to see the original cause of the error.
On 27 Jan 2004 10:25:31 -0800, Ti******@hotmai l.com (tina) wrote: Hello, Can you hale me to define my mistake please? I am trying to run a SQL Pass – Through Query from Access 2000 and inside the record set I am trying to loop for a LoginID. I think that this function should work. I get an error at this point Set StoredProcRecor dSet = DB.OpenRecords et(StoredProcQr yName, DB_OPEN_SNAPSHO T)
The error is this ODBC--call failed.
Please let me know how can I fix this. Thank you very much.
Tina
Function GetFullReportCC ListServer(MyUn it_Name As String)
Dim StoredProcName As String Dim StoredProcCall As String Dim StoredProcQryNa me As String Dim StoredProcQuery Def As QueryDef Dim StoredProcRecor dSet As Recordset
Dim DB As Database
On Error GoTo HandleErr Set DB = DBEngine.Worksp aces(0).Databas es(0)
StoredProcQryNa me = "qryGetFullRepo rtCCList" StoredProcCall = "execute sp_GetFullRepor tCCList '" & MyUnit_Name & "'"
Set StoredProcQuery Def = DB.QueryDefs(St oredProcQryName ) StoredProcQuery Def.Sql = StoredProcCall
Set StoredProcRecor dSet = DB.OpenRecordse t(StoredProcQry Name, DB_OPEN_SNAPSH OT)
StoredProcRecor dSet.MoveFirst
Do Until StoredProcRecor dSet.EOF
GetFullReportCC ListServer = GetFullReportCC ListServer & StoredProcReco rdSet.Fields("L oginID") & ";" StoredProcRecor dSet.MoveNext
Loop
GetFullReportCC ListServer = Left$(GetFullRe portCCListServe r, Len(GetFullRep ortCCListServer ) - 1)
ExitHere:
Set StoredProcRecor dSet = Nothing
Exit Function End Function
Thanks Perry. Unfortunately that did not work :(
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
That did not work :( Any other suggestions? Please!!!
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Tina,
Execute your statement (whatever ends up in variable StoredProcCall) in an
Access pass-thru query and see what kind of error you get.
"tina" <Ti******@hotma il.com> wrote in message
news:69******** *************** ***@posting.goo gle.com... Hello, Can you hale me to define my mistake please? I am trying to run a SQL Pass - Through Query from Access 2000 and inside the record set I am trying to loop for a LoginID. I think that this function should work. I get an error at this point Set StoredProcRecor dSet = DB.OpenRecordse t(StoredProcQry Name, DB_OPEN_SNAPSHO T)
The error is this ODBC--call failed.
Please let me know how can I fix this. Thank you very much.
Tina
Function GetFullReportCC ListServer(MyUn it_Name As String)
Dim StoredProcName As String Dim StoredProcCall As String Dim StoredProcQryNa me As String Dim StoredProcQuery Def As QueryDef Dim StoredProcRecor dSet As Recordset
Dim DB As Database
On Error GoTo HandleErr Set DB = DBEngine.Worksp aces(0).Databas es(0)
StoredProcQryNa me = "qryGetFullRepo rtCCList" StoredProcCall = "execute sp_GetFullRepor tCCList '" & MyUnit_Name & "'"
Set StoredProcQuery Def = DB.QueryDefs(St oredProcQryName ) StoredProcQuery Def.Sql = StoredProcCall
Set StoredProcRecor dSet = DB.OpenRecordse t(StoredProcQry Name, DB_OPEN_SNAPSHO T)
StoredProcRecor dSet.MoveFirst
Do Until StoredProcRecor dSet.EOF
GetFullReportCC ListServer = GetFullReportCC ListServer & StoredProcRecor dSet.Fields("Lo ginID") & ";" StoredProcRecor dSet.MoveNext
Loop
GetFullReportCC ListServer = Left$(GetFullRe portCCListServe r, Len(GetFullRepo rtCCListServer) - 1)
ExitHere:
Set StoredProcRecor dSet = Nothing
Exit Function End Function
Note that the person who normally posts in this gorup under the name of salad
does not post using an anonymous remailer, so this post is clearly a fake.
On 27 Jan 2004 22:59:18 -0000, Salad <oi*@vinegar.co m> wrote: Tina Kim wrote:
That did not work :( Any other suggestions? Please!!! *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
What say you and I chat about this at Cafe Journal in Mannheim I'll be there as usual on Thurs at 9 am in the corner near the door next to the coat rack. I have blond hair and will be wearing a red scarf and black coat. As you can see in this group, I am a skilled Access user. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: mo |
last post by:
The code I've pasted below is taken directly from Microsoft's site at
http://support.microsoft.com/default.aspx?scid=kb;EN-US;308157
As far as I can tell the error is raised on this line:
conn = New SqlConnection("server=MyServer;Integrated
Security=SSPI;database=pubs")
If I use the code as is, I get the error above. The code only works...
|
by: Jeff Reed |
last post by:
I am experiencing the the problem outlined the below. Unfortunately, I am using WinXP and I not sure if I can apply the solution due to lack of security control
Any feed back would be apreciated
http://support.microsoft.com/default.aspx?scid=kb;EN-US;31795
FIX: "Failed to Start Monitoring Directory Changes" Error Message When You Browse...
|
by: Tim D |
last post by:
Hi,
I originally posted this as a reply to a rather old thread in
dotnet.framework.general and didn't get any response. I thought it might be
more relevant here; anyone got any ideas? My questions are below...
"David Good" wrote:
> We have a network running both Win2k and Win2k3 webservers and our web sites
> reside on a UNC network...
|
by: Bijoy Naick |
last post by:
I've implemented forms authentication and authorization on my application.
In my Web.Config, my authorization section looks like this..
<authorization>
<allow roles="admin" />
<deny users="*" />
</authorization>
If an authenticated user, who is NOT designated the role "admin" attempts
to access this folder, he/she is simply redirected...
|
by: Adam |
last post by:
Trying to get an asp.net 2.0 app running and am receiving this error. I see a
bunch of people with this error on the net, but no solution:
Works fine on my local machine, deployed to a server it yields this message.
Failed to map the path '/App_GlobalResources/'
Stack trace: at...
| |
by: ruben |
last post by:
Hi:
I'm running a large database on PostgreSQL 7.1.3. 20 days ago the
database failed with a threatening and not too descriptive error like:
pg_exec() query failed: server closed the connection unexpectedlyThis
probably means the server terminated abnormally before or while
processing the request.
I lost some data and had to...
|
by: Laurent Lequenne |
last post by:
Hello There,
I just converted a VS 2003 C++ Project into VS 2005. I already made some
changes in my headers files, has I had compilations errors with enums
declarations. Now everything compiles and I got errors at the link as shown
below. If anyone could help me to get that thing compiled, he's welcome
:-)))
Thanks,
|
by: news |
last post by:
I just upgraded to PHP 4.4.2 on my Slackware 10.2 system. And
Apache/mySQL/PHP all work great through a browser. No errors.
But when I try to run a PHP script through the command line, which I
need to do, I get blocks of errors like:
root@slackserve:/var/www/htdocs# php ./phptest.php
PHP Warning: Unknown(): Unable to load dynamic library...
|
by: Dennis |
last post by:
I'm getting the following problem occasionally...the application will
work perfectly well for a period of time and then this pops up.
I have tried turning off the default proxy in the web.config which I
had seen on other posts but that did not solve the problem.
Any assistance or ideas would be appreciated
Thanks
|
by: kencana |
last post by:
Hi all,
I was wondering why I always get "failed to open stream: HTTP request failed!" error in either loading a normal or xml file. i don't understand why i can't get the whole result. the result i get is only some part of the respective url (the one i tried to load). The following is my php code to open the file:
$file=...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |