473,791 Members | 2,861 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unspecified error when adding a link



Hi - using asp and ms Access - this works ok:

set Products = Server.CreateOb ject("ADODB.Rec ordset")
Products.Active Connection = myConString
Products.Source = "SELECT Products.produc tid, Products.produc t,
Products.price, Products.partno FROM Products"
Products.Cursor Type = 0
Products.Cursor Location = 2
Products.LockTy pe = 3
Products.Open()

...but when I try to add a connection to another table I get the dreaded
unspecified error:

(same code)
Products.Source = "SELECT Products.produc tid, Products.produc t,
Products.price, Products.partno , Sizes.ProductSi ze AS Size FROM Products
INNER JOIN (Sizes ON Products.SizeID = Sizes.SizeID) "
(same code)

Any ideas why this may be happening? I have latest MDAC, XP Pro (IIS
running locally), and no memo fields!

Thanks,

Mark
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
9 1574
Access is very fussy about the placement of parentheses. Try designing the
query inside of Access' GUI, and see if it looks any different. Or, you
could try the non-ANSI way, e.g.

SELECT p.productid, ..., s.ProductSize
FROM products AS p, Sizes AS s
WHERE p.SizeID = s.SizeID

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Mark" <an*******@devd ex.com> wrote in message
news:#U******** ******@tk2msftn gp13.phx.gbl...


Hi - using asp and ms Access - this works ok:

set Products = Server.CreateOb ject("ADODB.Rec ordset")
Products.Active Connection = myConString
Products.Source = "SELECT Products.produc tid, Products.produc t,
Products.price, Products.partno FROM Products"
Products.Cursor Type = 0
Products.Cursor Location = 2
Products.LockTy pe = 3
Products.Open()

..but when I try to add a connection to another table I get the dreaded
unspecified error:

(same code)
Products.Source = "SELECT Products.produc tid, Products.produc t,
Products.price, Products.partno , Sizes.ProductSi ze AS Size FROM Products
INNER JOIN (Sizes ON Products.SizeID = Sizes.SizeID) "
(same code)

Any ideas why this may be happening? I have latest MDAC, XP Pro (IIS
running locally), and no memo fields!

Thanks,

Mark
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #2

Hi Aaron - thank you (I checked your site before posting - but did not
think to rewrite the query in the way you have shown) - I do not have
Access, just an Access database file - which is why I could not test
this in it's gui.

Thank you for your help,

Mark
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3
Mark wrote:
Products.Source = "SELECT Products.produc tid, Products.produc t,
Products.price, Products.partno , Sizes.ProductSi ze AS Size FROM
Products INNER JOIN (Sizes ON Products.SizeID = Sizes.SizeID) "


Why the parentheses? You only have two tables.

Products INNER JOIN Sizes ON Products.SizeID = Sizes.SizeID "
You should always build and test your queries in your database's native
query tool before trying to run them in asp. With Access, that means using
the Access Query Builder to create and test your queries.

HTH,
Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #4
I agree. I'm to the point where I build any complex query in Access and
then copy & past it over. Keep in mind that purchasing MSAccess is
actually to your advantage as it will allow you direct access to the
objects if you need to make a change, look up a field name or field data
type. Then, of course, there are the benefits of having Access in the
event that the database ends up corrupted.

David H

I also use the VBEditor in Access to test & debug any VBScript function
that I'm working on.

Bob Barrows [MVP] wrote:
Mark wrote:
Products.Sour ce = "SELECT Products.produc tid, Products.produc t,
Products.pric e, Products.partno , Sizes.ProductSi ze AS Size FROM
Products INNER JOIN (Sizes ON Products.SizeID = Sizes.SizeID) "

Why the parentheses? You only have two tables.

Products INNER JOIN Sizes ON Products.SizeID = Sizes.SizeID "
You should always build and test your queries in your database's native
query tool before trying to run them in asp. With Access, that means using
the Access Query Builder to create and test your queries.

HTH,
Bob Barrows


Jul 19 '05 #5
David C. Holley wrote:
I agree. I'm to the point where I build any complex query in Access
and then copy & past it over.


Now you're ready for the next step: make a clean break from using dynamic
sql and execute your saved queries instead. :-)

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #6
Hi - thanks for all of your comments, all of which I take on board
(setting up queries in a designer - means getting Access, and running
queries as sort of SPs from within Access).

If you're interested, it turns out that Access didn't like the "AS
Sizes" part of the query. Don't know if it's a reserved word - but by
changing to "AS [Sizes]" it now works without any errors.

Again, thanks, Mark

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #7
"Mark" wrote in message news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
: Hi - thanks for all of your comments, all of which I take on board
: (setting up queries in a designer - means getting Access, and running
: queries as sort of SPs from within Access).
:
: If you're interested, it turns out that Access didn't like the "AS
: Sizes" part of the query. Don't know if it's a reserved word - but by
: changing to "AS [Sizes]" it now works without any errors.

Rather that purchasing Access, if you can, consider using SQL. You can get
MSDE for nothing.
http://www.asp.net/msde/default.aspx?tabindex=0&tabid=1

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 19 '05 #8
Mark wrote:
Hi - thanks for all of your comments, all of which I take on board
(setting up queries in a designer - means getting Access, and running
queries as sort of SPs from within Access).

If you're interested, it turns out that Access didn't like the "AS
Sizes" part of the query. Don't know if it's a reserved word - but by
changing to "AS [Sizes]" it now works without any errors.

Ah! I missed that! "Size" is a reserved ODBC keyword
(http://www.aspfaq.com/show.asp?id=2080).

It would have been easier to spot that if you had been able to tell us that
the query ran fine in the Access Query Builder but failed when run by ADO
.... ;-)

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #9
Hi Roland - yes I know, thank you. I already have the full SQL Server
through MSDN (which didn't include Access) - trouble is with this
project, the client is insisting it uses Access. I tried to push them
down the sql route, but to no avail.

And unfortunately the way that Sql Server builds its queries isn't
always backwards compatile with what Access wants (parenthesis was
mentioned above - I know there are changes there) - so using that gui
isn't always an option either - even for testing.

Thanks for the input either way,

Mark

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1882
by: Gloss | last post by:
In Visual Studio 2003 when I try to add a new component or form to a project it pops up an error, "Unspecified Error" with no details. I tried re-setting permissions on the disk drive and also re-installing VS 2003 with no joy. Everything was hunky-dory until I installed WSE 2.0. Anybody have any clues?
6
2553
by: wk6pack | last post by:
Hi, I have a question about my coding practise. I have a class method to return a value from a database. I open the connection do my search and dispose the reader. Open the reader with a new recordset and then close the reader and close the connection. I do this for every new record I am adding. But I seem to get an error around the 770 record to add. The error is and unspecified error at the connection.open() for that record.
4
2543
by: RM | last post by:
Had VS .Net 2002 installed on W2k Server SP3 and supported a number of web sites. Installed VS .Net 2003 on Friday and now all web sites using .Net & MS ACCESS get this strange error upon open. ASP=/TestDotNet/AdoNet.aspx System.Data.OleDb.OleDbException: Unspecified error at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) at System.Data.OleDb.OleDbConnection.InitializeProvider() at System.Data.OleDb.OleDbConnection.Open()...
2
2661
by: Jim Lacenski | last post by:
I have a VB class that uses .NET and ADODB to write into an Excel spreadsheet (via Jet) on a server as part of a web application. ADODB is used instead of ADO.NET because it greatly simplifies the write process, and is supported for use on a server. (Excel is not supported (1), licensing issues with OWC). The routine works fine for a user at the server, but when a user from a system other than the server runs the page the error...
1
3234
by: Siegfried Heintze | last post by:
I'm using a third party hosting service. I presently have a Web Service on this hosting service's server that loads and executes a native mode DLL. This demonstrates that the hosting service has given me proper access to the temporary directory c:/Windows/Microsoft.NET/Framework/V1.1.4322/Temporary ASP.NET Files/root/...." I believe it also demonstrates that I have access to c:/documents and settings/xyz/aspnet/local settings/ ...
3
1057
by: John Wildes | last post by:
Hello I think I screwed myself here and I am no sure how to fix it. I installed Visual Basic 6 to work on some old projects, but I installed it after I installed Visual Studio.net 2003. After I installed VB6, I couldn't add forms to my VS.NET VB Projects, so i removed it and I still can't add forms to my projects. I get an error "UNSPECIFIED ERROR" real helpful I know, I've searched everywhere on support.microsoft.com and I can't...
1
1309
by: ECathell | last post by:
I am getting an unspecified error when adding a windows form to a project. New project, old project. Doesn't matter. Also happens for user control. All the message box says is Unspecified Error. -- --Eric Cathell, MCSA
0
1804
by: fniles | last post by:
I am using VB.Net 2003 and MS Access database. Sometimes when I open the database, I got the error "Unspecified error" The application validate users, when it validates users, it reads from a table in the database. I use connection pooling by opening the database in Form_Load, then everytime somebody comes in, I open the database and reads from it to validate the user. I then close the database. How can I fix this "Unspecified error" ?...
9
2949
by: Ratfish | last post by:
I'm getting a "2014:: Commands out of sync; you can't run this command now" error on a php page when I try to call a second stored procedure against a MySQL db. Does anyone know why I might be getting this error? The error doesn't occur on my development box where I use the 'root' db user, but does occur in production where I'm using a non- root user record to establish a connection. I'm essentially opening a connection at the top of...
0
10426
Oralloy
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10207
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10154
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9993
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9029
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6776
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5430
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5558
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4109
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.