473,788 Members | 2,787 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access Database just upsized and i'm going to kill someone!

17 New Member
Ello everyone,

Ok i've just upsized the database to SQL Server 2005, here is the code:

Set con = Application.Cur rentProject.Con nection
Set rs = New ADODB.Recordset
rs.CursorType = adOpenDynamic
rs.LockType = adLockOptimisti c

sql = "INSERT INTO reminders (CompanyID, [Company Name], [Company Contact], Number, Appointtime, Appointdate, [User]) VALUES ('" & idnum.Value & "','" & [Company Name].Value & "','" & [Contact Name].Value & "','" & Telephone.Value & "','" & remtime & "', '" & Format([Recall Date].Value, "mm/dd/yyyy") & "','" & User & "')"

rs.Open sql, con, , , adCmdText

--------------------------------------------------
Which generates this query:


INSERT INTO reminders (CompanyID, [Company Name], [Company Contact], Number, Appointtime, Appointdate, [User]) VALUES ('35243','Some Company','Mr Smith','00000 - 000000','09:00: 00', '03/26/2008','MRF')

If I use rs.open sql,con,,,adcmd text it dies with Error in insert statement

If I open the Server manager and create a query using the above string it works fine!

Why?

Am I being stupid here?

Sorry quick edit here, the data is coming from Linked tables so this front end should already be connected fine.
Apr 14 '08 #1
1 1304
marcf
17 New Member
I think I kinda sorted it.

Basically you can't assume that your DSN is working correctly, for some odd reason if you use application.cur rentproject.con nection object it works fine unless you try to DELETE or INSERT.

Instead I swapped out the Con= Application.Cur rentproject.Con nection for an SQL connection string (which I thought a machine DSN was supposed to do?)
now it all appears to work fine and aside from some jiggery pokery with dates and field names our database is about 75% faster.

If anyone can give me an idea why the DSN doesnt actually seem to provide a proper connection to an SQL Server i'd appreciate it as it seems pointless for it not to work properly.
Apr 14 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3237
by: Bob Davies | last post by:
I have upsized an Access database into SQL Server and manged to get the data in place ok. The wizard created an Access Project which I have started to modify. However, I am also trying to get data from an AS/400. Specifically for a currency/exchange rate file. I only want ot copy the records since the last copy otherwise there are a vast number of records. I have created a linked server to the AS/400 within SQL Server, and created a...
0
1814
by: ImraneA | last post by:
Hi there I had pleasure of upsizing Access v97 db to Access v2K/SQL 2K. Wish to provide some knowledge gained back to community - hopefully help others. 1.Using Upsizing wizard - will either work or not. For me it did not. Why ?
2
1871
by: Jose Fernandez | last post by:
Dear Friends, A friend of mine have asked me a favor, he has started a new small bussines to rent equipment, he wish to control the inventory and to issue renting orders from the clients, but it is required to avoid the multiple booking of the rented equipment, I was thinking to generate a "Orders Control" with the standard databases generated by MS Access and do some programming modifications in order to avoid the multiple booking. Does...
3
1232
by: Mark T. | last post by:
Hi all, I would like to find out about a Microsoft Access database that was "converted" to SQL. Not sure what that means, and would appreciate anyone letting me know. I'm at the intermediate level with Access and have some VB experience, but not SQL. I would like to extract the data from the SQL converted database and burn it onto a CD. What would be the best method to do this? Thanks for any advice or direction.
2
2035
by: David C. Barber | last post by:
upsized an MDB to ADP/SQL Server 2000 under Access 2000. All the DAO code that I've changed to ADO code is working fine, HOWEVER the form Record Source itself does not seem willing to return data. I've set the Record Source to both the query, and the SQL contained within the query, and although the system pauses long enough to have gone out and retrieved the data, I can't see it. The form itself remains gray. In addition: ...
35
3227
by: deko | last post by:
Do I get more scalability if I split my database? The way I calculate things now, I'll be lucky to get 100,000 records in my Access 2003 mdb. Here some math: Max mdb/mde size = 2000 x 1024 = 2,048,000k Let's say on average each record in the database consumes 15k 2,048,000/15 = 136,533 records
12
1684
by: Mike | last post by:
I have an Access DB that I upsized to a SQL server DB. The tables that I upsized I can't seem to modify. I wanted to insert some data into the table and I am getting the following error: ---Begin Error--- Server: Msg 107, Level 16, State 3, Line 1 The column prefix 'SVC_Details' does not match with a table name or alias name used in the query. ---End Error---
3
2125
by: George H. Slamowitz | last post by:
Hello All I am trying to convert a MS Access 2000 application to a VB application (Just Started Yesterday) I am using Visual Studio .NET 2003 utilizing Visual Basic .NET I think I have a good feel to what I have to do, but does anyone know of a GOOD white paper on what is involved, pitfalls, etc?
17
4420
by: Mell via AccessMonster.com | last post by:
Is there a way to find out where an application was created from? i.e. - work or home i.e. - if application sits on a (work) server/network, the IT people know the application is sitting there, but is there a way they can find out if that application was put there from a CD or email or created at work? Hint: It's not on a client/server database, just native jet database mdb created on Access 2003 (default 2000)...
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10366
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
10173
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...
0
9967
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...
1
7517
isladogs
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4070
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
2
3674
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.