Last post Aug 13, 2010 10:18 AM by Mikesdotnetting
Aug 13, 2010 04:54 AM|magic mushroom|LINK
Im trying to Quere and Access Database i used this for SQLSERVER and it worked "SELECT [Code],[Description]FROM [New2].[dbo].[Item]"; but not with MS Access
Aug 13, 2010 06:48 AM|Mikesdotnetting|LINK
Access has no concept of database and owner qualifiers. Remove [New2].[dbo]. so that it reads Select [Code],[Description,[ITem] From.....
Aug 13, 2010 06:49 AM|DarrellNorton|LINK
I don't think Access supports schemas or owners (dbo in your example).
Try your query without New2 and dbo:
SELECT * FROM [Item]
Aug 13, 2010 08:24 AM|magic mushroom|LINK
I did figure it out thanks but i need this code to be converted
command.CommandText = "SELECT [BookingNumber], [ItemCode], [ItemPrice], [Status], [ArrivalDate], [DepartureDate] FROM Bookings WHERE ([ArrivalDate] >= '" + start.ToShortDateString() +
"' OR [ArrivalDate] <= '" + end.ToShortDateString() + "' OR [DepartureDate] <= '" + end.ToShortDateString() +
"' OR [DepartureDate] >= '" + start.ToShortDateString() + "' AND [Status] != 'C'";
for access use
Aug 13, 2010 10:13 AM|magic mushroom|LINK
Does anyone know how to convert this SQLSERVER connString to an Access DB string?
Aug 13, 2010 10:18 AM|Mikesdotnetting|LINK
You should keep things to one question per thread. Your initial question was resolved, so now you should start new threads for separate issues. However, in the meantime, this might help:
Migrating from Sql Server to Access in ASP.NET