SQL Date Nightmare Connecting Via JET

Mar 19, 2008

Greetings,

I'm using flash mx and MDM zinc which i assume connects using the JET rather than ADO database engine.

For the life of me cannot get a simple update to work due to the dates
involved, lost count how many hours have gone by trying!!!

Within access I can easily switch quotes and hash symbols and all SQL THREE SQL queries work without problems on my database i.e.

UPDATE UserOverallResults
SET Results = 20
WHERE UserName ='Robbie'
AND Quizdate= '19/2/2008 12:15'

UPDATE UserOverallResults
SET Results = 20
WHERE UserName ='Robbie'
AND Quizdate= "19/2/2008 12:15"

UPDATE UserOverallResults
SET Results = 20
WHERE UserName ='Robbie'
AND Quizdate= #19/2/2008 12:15#

Within the database the fields are defined as :-
Results (Integer) Username (Text) and QuizDate (Date/Time) within MS ACCESS DB schema.

in Flash MX TextDate param is a STRING and All parmaters are populated appropriately (see this later in error message).

Example of existing date data stored in database in format "19/02/2008
16:48:11" as a DATE/TIME field.

My code within in flash is :-

mdm.Database.MSAccess.runQuery("UPDATE UserOverallResults SET Results = " +
UserScore + " WHERE UserName = '"+ UserName +"' AND QuizDate = '" +textDate
+ "' ");
I've tried with and without Hashes still no joy ..

mdm.Database.MSAccess.runQuery("UPDATE UserOverallResults SET Results = " +
UserScore + " WHERE UserName = '"+ UserName +"' AND QuizDate = Format( '"+
textDate +"', "#yyyy\-mm\-dd hh:nn:ss#")");
The error message I get from the code above is ..

SQL Query has failed for the following reason: Data type mismatch in
criteria expression SQL statement: UPDATE UserResultsOverall SET Results =
30 WHERE UserName = 'd' AND QuizDate = Format('19/2/2008 19:4:35'
,"#yyyy-mm-dd hh
nss#")

My text string removes the leading zeros not sure if that would cause an
issue or not (its doesnt in MS ACCESS running query) ...

Anyone have any ideas??? Losing my mind here !!

PS I had problems using '&' instead of '+' to concatenate fields.

Cheers
Rob

View Replies


ADVERTISEMENT

Filtering Nightmare

Feb 1, 2008

Is there any way that I can import a text file and split the data into three columns without having to go through 65000 lines of text.

It is basically a print off of a directory structure. I have a very large text file that lists the files in folders for each of hundreds of users. I need to divide the information up into three columns so that the below data:

BOBSongs

2003-07-15 12:10 PM 1,474,564 blue.mp3
2003-07-15 12:09 PM 858,204 orange.mp3
2003-07-15 12:10 PM 1,665,028 yellow.mp3

BOBsongshappy

2005-08-23 03:01 PM 917,504 jolly.mp3
2003-07-15 12:09 PM 331,005 joker.mp3

BOBfiles

2005-08-23 03:01 PM 917,504 writing.doc

ends up looking like this:

BOBsongs1,474,564 blue.mp3
BOBsongs858,204 orange.mp3
BOBsongs1,665,028 yellow.mp3
BOBsongshappy 917,504 jolly.mp3
BOBsongshappy 331,005 joker.mp3
BOBfiles917,504 writing.doc

I easily imported the file into Excel, but it is still all in a column. Any advice would be appreciated.

View 5 Replies View Related

Nightmare Using Access

May 8, 2006

If any of you guys have any spare time on your hands would you mind having a look at this mess and tel me where I have gone wrong.http://www.geocities.com/andrewnorthwales/Andrews_database.mdb andrewnorthwales/Andrews_database.mdb mm this board is messing with my url if it puts us.share just change it to www. dont know why my url is not working on hereIm trying toProduce a list of available vehicles and drivers for a given input dateSearch for an availability that satisfies a prospective customer’s criteria (specific vehicle for a specific date)its my first ever database and I cant get the begger working right.it must be relationships or something, but I cant see where I ahve gne wrong.its just a fictional Weding car hire firm and I create records/orders for fictional customers.but its melting my brain __gloop...:confused:

View 5 Replies View Related

Nested IIf Nightmare

Oct 20, 2006

Poor old Access. I think I've made it wave a white flag, but based on the following expression I am trying to get it to evaluate, I'm not too surprised...

The situation is that I have a large number of tick boxes on a form, which nicely filter through to a series of fields in a table whose values are either -1 or 0 (according to if the box is ticked or not). Unfortunately, I now need to generate a small piece of text for a report based on which boxes have been ticked. Deep breath...

institution:
IIf([people].[memctf]=-1,"CTF",(
IIf([people].[memwt]=-1,"Westcott",(
Iif([people].[memwy]=-1,"Wesley",(
Iif([people].[memry]=-1,"Ridley",(
Iif([people].[memwm]=-1,"Westminster",(
Iif([people].[memiocs]=-1,"IOCS",(
Iif([people].[memermc]=-1,"ERMC",(
Iif([people].[memmbi]=-1,"Margaret Beaufort Institute",(
Iif([people].[memcjcr]=-1,"CJCR",(
Iif([people].[memcym]=-1,"CYM",(
Iif([people].[memindepba]=-1,"Independent BA",(
Iif([people].[memhmc]=-1,"Henry Martyn Centre",(
Iif([people].[memregchelm]=-1,"Regional (Chelmsford)",(
Iif([people].[memregnor]=-1,"Regional (Norwich)",(
Iif([people].[memregpboro]=-1,"Regional (Chelmsford)",(
Iif([people].[memregalbans]=-1,"Regional (St Albans)",(
Iif([people].[memdiocedsips]=-1, "Diocesan (Eds and Ips)",(
Iif([people].[memdiocnorwich]=-1, "Diocesan (Norwich)",(
Iif([people].[memreg]=-1, "Regional", "Unknown"
)))))))))))))))))))))))))))))))))))))

The logic seemed to work nicely when there were just 3 options in the list, but when I try to enter the above, Access says "the expression you entered is too complex". Poor baby! :D

Does any one have any idea how I can get it to evaluate the data I need?

View 4 Replies View Related

Refeshing Nightmare

Jul 5, 2005

Hi everyone. I was wondering if anyone could help me. I am in the process of designing a database (Access 2002, office xp), but the problem I am having is that when I am pulling in an ID number, from one form into another form, the form I want this number to land in crashes, with the warning that more than one user is trying to access the form at the same time (they are not, just me).

After having to clear this error box (a few times, it keeps reapearing) errors then appear in each of the destination forms fields. :eek:

I think it is something to do with the way the database is setup in multiuser envirionments and retry intervals etc - and I have been playing about with the values, which seems to work once, but then it goes straight back to crashing. :confused:

If anybody give me some default values that might work :o or any other remedies for this problem, this help would be very much appreciated :)

Many Many thanks.

View 4 Replies View Related

Strange, A Nightmare But Real!

Apr 27, 2005

Many will look at this and laugh but its real.
My Access Dbs are opened in hidden state and i dont see my forms.
This must be the cause.
I tried to hide the menubars using ghudsons code,i disabled the shift key. But i dont know what has happened.

I can nolonger view them. I have tried every method out and i think the only option is to repair OS, may be it will work.

I have enabled the database which i disabled the shift key but when i hold down the shift key, it loads but the forms are totally hidden, STRANGE! ijust see the grey access background and when i click on it twice from the task bar.It pops up.

I have tried to make another database, use the autoexec macro to call a form which enables all command bars, but this works only for this database and when i press the shift key down, this database hides the toolbars and i only see the grey access background. This is happening on EVERY DB ive developed on this machine. I thought it was the access that is totally corrupted but i tried to reinstall my office and i still get the same results
This is now a NIGHTMARE to me.

When db is shifted to another machine it works fine as before.
This is REAL but can i get some suggestions from you folks before i repair my OS.

View 1 Replies View Related

Access Query Nightmare

Mar 23, 2006

Hello, im having a real problem running a certain query in access. My database is used to monitor drain spillages, and the query im trying to build needed to look down a column and show descrite water spills. A descrite spill is when water spills for a bit then stops. I need to show how many times this happens in a column.

The complexity of the problem (comparing one value in a column to other values in that column) coupled with the size of the dataset (600K+ rows) just baffles everything I throw at it.

I had two stabs at it. One involved a recordset - looping through and updating a new field. Recordsets can cause database bloat - in this case it bloated the db to 2GB (Accesses maximum size causing the code to crash) - this is something I've never managed before. The other involved a function that left access frozen.

I was really stuck on this until a crazy idea came to mind, i want to know if this would work.

This might sound stupid but how about some crazy thing like adding a new column and numbering the fields, then adding some kind of query that says if the value is over 0.001 then add a 1, if not leave blank. Then have something like if the column has a 1 in it then check the next, if this one has a 1 in it then repeat this step, if not then this is 1 spill. Store the amount it starts and stops to a variable and just use that number as the Number of descrite spills.

Would this work?

Thanks,
Marley.

View 1 Replies View Related

INSERT Statment Nightmare

Dec 9, 2006

Hey All,

Im using MS Visual Web Developer with an Access Database, i am trying to enter a new row of data into a database via a select statment attached to a button_click event. the code i am using looks something like this.

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

Me.AccessDataSource2.SelectCommand = "INSERT INTO [Tblissues] ([IssueDate], [IssueTime], [PlantLocation], [MachineName]) VALUES ('12/9/06', '3:00 PM', 'Gville', 'Snack2')"

End Sub


that being said. when i click the button, NOTHING happens, no error and no insert!!!


I did test the connection to the Database and its fine, i can do an update and i can read the data that exists in the database i just cant insert a new row.

This is not the first time i have delt with INSERT statments but this has me at my whits end and any help would be great.

Thanks

View 1 Replies View Related

Nightmare Query - ? Hidden Problem

Sep 19, 2005

Hi
I have created a monster I think and I am not sure how or why.
I needed a query to tie together data from a range of tables and so it has about 20 constituent queries, each of which involves some calculation.
The query isn't so horrendous
SELECT tblApplications.lngApp, qryExpWkHomeHelp.WkHomeHelp, qryExpWkPrescrip.WkPrescrip, qryExpWkHosp.WkHosp, qryExpWkRent.WkRent, qryExpWkSup.WkSup, qryExpWkInt.WkInt, qryExpWkLife.WkLife, qryExpWkCouncil.WkCouncil, qryExpWkCar.WkCar, qryExpWkCar1.WkCar1, qryExpWkHp.WkHp, qryExpWkDep.WkDep, qryExpWkCont.WkCont, qryExpWkProp.WkProp, qryExpWkOther.WkOther, qryExpWkTel.WkTel, qryExpWkTv.WkTv, qryExpWkWater.WkWater, tblApplications.lngAppCon, tblApplications.bAppEleg, tblApplications.dtmAppGcSub
FROM qryExpWkWater RIGHT JOIN (qryExpWkTv RIGHT JOIN (qryExpWkTel RIGHT JOIN (qryExpWkOther RIGHT JOIN (qryExpWkProp RIGHT JOIN (qryExpWkInt RIGHT JOIN (qryExpWkLife RIGHT JOIN (qryExpWkCouncil RIGHT JOIN (qryExpWkHp RIGHT JOIN (qryExpWkDep RIGHT JOIN (qryExpWkCont RIGHT JOIN (qryExpWkCar1 RIGHT JOIN (qryExpWkCar RIGHT JOIN (qryExpWkSup RIGHT JOIN (qryExpWkRent RIGHT JOIN (qryExpWkPrescrip RIGHT JOIN (qryExpWkHosp RIGHT JOIN (qryExpWkHomeHelp RIGHT JOIN tblApplications ON qryExpWkHomeHelp.lngExpApp = tblApplications.lngApp) ON qryExpWkHosp.lngExpApp = tblApplications.lngApp) ON qryExpWkPrescrip.lngExpApp = tblApplications.lngApp) ON qryExpWkRent.lngExpApp = tblApplications.lngApp) ON qryExpWkSup.lngExpApp = tblApplications.lngApp) ON qryExpWkCar.lngExpApp = tblApplications.lngApp) ON qryExpWkCar1.lngExpApp = tblApplications.lngApp) ON qryExpWkCont.lngExpApp = tblApplications.lngApp) ON qryExpWkDep.lngExpApp = tblApplications.lngApp) ON qryExpWkHp.lngExpApp = tblApplications.lngApp) ON qryExpWkCouncil.lngExpApp = tblApplications.lngApp) ON qryExpWkLife.lngExpApp = tblApplications.lngApp) ON qryExpWkInt.lngExpApp = tblApplications.lngApp) ON qryExpWkProp.lngExpApp = tblApplications.lngApp) ON qryExpWkOther.lngExpApp = tblApplications.lngApp) ON qryExpWkTel.lngExpApp = tblApplications.lngApp) ON qryExpWkTv.lngExpApp = tblApplications.lngApp) ON qryExpWkWater.lngExpApp = tblApplications.lngApp
WHERE (((tblApplications.bAppEleg)=Yes) AND ((tblApplications.dtmAppGcSub) Is Null));

Well maybe it is pretty horrific!
However it is taking nearly two minutes to load on a fast PC (3.4GHz Pentium 4 with 1Gb RAM) so put it on a basic desktop and it will die.
I did wonder about fragmenting it into four queries and then putting one query at the top of the nest but reckon that's another layer and all the calculations need to be done.
Basically the sub queries are calculating a weekly value based upon input and periodicity of payments - i.e. if quarterly then it divides the payment by 13.
Any thoughts on how I could speed it up?
Thanks in anticipation

View 4 Replies View Related

Connecting A Document

Jun 23, 2005

Is it possible to connect a Document to the Access Database. To have a button beside the field in the form allowing you to browze and connect the document. If not does anyone have a way around this. Any help would be well appreciated.

Shane

View 1 Replies View Related

Connecting To MS-SQL Server

Mar 25, 2006

Hi
We have a database implemented in MS-SQL server 2000 on a local machine. I want to use some of tables in my access (or excel) program. Can I link to the table?

Thanks

View 1 Replies View Related

Connecting Tables

Apr 8, 2008

I'm having a problem in Access where I'm trying to connect 2 tables together.
On one table is all the information of the person, the other table is a list from 1-50. That list is a drawing of all the peoples ID number for a drawing. When I type in their ID next to what order they got picked in is there any way where All of their information comes with that ID number they have? I really need help on this.

View 2 Replies View Related

Connecting Queries

Jul 21, 2007

Hi there, I'm currently writing an accounting system and i got stuck with this section of trying to produce the account name in a query.

i have four tables

tblPurchase
PurchaseID -Number

tblAccounts
AccountID - Number
AccountName - Text, usually has names like asset, cost of sales, expense, telephone, electricity, etc...

tblItems
ItemID, Number
AssetNum (tblAccounts.AccountName foreign key1), Number
ExpenseNum(tblAccounts.AccountName foreign key2), Number
IncomeNum(tblAccounts.AccountName foreign key3), Number

tblPurchaseLines
PurchaseNum (foreign key for tblPurchase.PurchaseID), Number
ItemNum (foreign key for tblItems.ItemID), Number




My question is how can i generate the query with the following fields:

PurchaseID
ItemID
AccountName of AssetNum
AccountName of ExpenseNum
AccountName of IncomeNum

I am aware that the query would produce three PurchaseID's for every ItemID it would encounter for every PurchaseLine.

Please point me in the right direction.

View 2 Replies View Related

Connecting To Database

Jan 17, 2005

i need help connecting to an access database using java.
any help with this would be great because i am lost.

View 2 Replies View Related

Connecting Tables

May 27, 2005

So, here's my problem: I'm doing a database on my DVDs, and I wanted to add as much info as I can about them. But I have some problems with "actors", as you know one actor can be in several movies and one movie has several actors.

I want to put the actors in their own table and movies in their own. I know how to link them together, but I don't know how to link them together so that actors could be in more than one movie and movie could have more than one actor.

Hope that even someone understands my question since my english ain't so good..

View 3 Replies View Related

Connecting To ODBC Through ASP

Jul 18, 2005

Hello All,

I'm somewhat new to working with ASP and very new to databases, MS Access, and SQL.

What works is opening my .mdb file, which connects through an ODBC DSN to get dynamic data. Nothing fancy.

What I'm trying to do is create a web interface via ASP to access certain data and fields in the db.

Here are the super-noob questions...Do I need a version of MS Access and the .mdb file on my webserver (where the .asp file is)? I don't have the ODBC DSN set up on the webserver (which is linux). Does that need to be done before anything will work?

Let me know if code snips would be of any assistance. Thanks much, in advance!

-K

View 3 Replies View Related

Connecting Three Tables Together

Jan 10, 2014

I work in an office where we do testing with clients . I want to create a database that can create a unique report for each client on the testing results.I envision a database with at least three tables. The first table would be client demographic information with a unique ID field (CID). The second table would be the Appointment information (date, referral source, etc.). The third table will have the test results (although I'm wondering if I should have a table for each test).

Sometimes, we see clients more than once, and so need the ability to have more than one appointment record for each client. For each appointment, we would record test results.I have created a one-to-many relationship between the Client Demographics and the Appointment tables. When I created the form for the Client Demographics, I inserted a subform for the Appointment. That works great. The CID automatically transfers to the Appointment record and instantly connects the two.How do I connect the Test Results table so that the CID automatically transfers to the Test Results record as well as the Appointment Date field from the Appointment Table.

View 3 Replies View Related

Connecting To MySql From Access

Feb 26, 2006

Hi all,

hope someone can help me with this.

Before we moved webhosting company we could have external access to our MySql database which was great as our MS Access system would periodically pull data from our MySql site (namely customer enquiries which were entered via a form on our website) and dump them in our MS Access live quotes table all automatically.

With our current host (which seems to be the norm from my web-searches) they only allow local access to the MySql system.

My question is, how can I oversome this hurdle without having to move hosting company. I really don't want to move again as it's a real pain.

All suggestions welcome.

ahrint

View 2 Replies View Related

Connecting Records From Two Different Tables

Apr 14, 2008

is there a possibility to connect two different databases??? I mean is, I have a table called PERSON. under PERSON, there are fields called PERSON NAME, BIRTHDAY and ADDRESS. another table is called SEMINARS, under it are DATES FROM, DATES TO and TITLE.

I want to combine one of the records in PERSON to the 5 records in the SEMINARS. is there a possibility to do that???

to include in the information, there are 10 records in the PERSON and there are 75 records in the SEMINARS. and I want to add more records in SEMINARS in any of the records in PERSON in the near future.

View 1 Replies View Related

Connecting Cells/Fields

Aug 4, 2007

Hello,

how do you connect fields from one table to another? what im trying to do is to connect two fields from product! product id and order details! product id. the one in the order details table should equal whatever i input in the product table.

View 5 Replies View Related

Connecting Data Basess

Apr 14, 2007

HI

A school table is there in old and new data base,
if i give school key as 001 (which is the column of school table) i need to compare old database school table "001 key" and new database school table
"001 key" and if it is not matched it should be displayed.
Please give me detailed dicription with example.

thanks

View 1 Replies View Related

Access 2K Manualy Connecting........

Feb 22, 2005

Hi there,

I have a little problem: And hope somebody can give me an answer.

I have two tables, one form and on the form I have two textboxes. One of the textboxes should be connected to ONE table and field, and the other textbox to the OTHER table and field.

I tryed to conect through the expression builder but had not much luck! See code below.


This code comes up in the ControlSource property section and textbox also:
=[tbl_CompanyContact]![CompanyPhoneNumber]
=[tbl_PrivateContact]![PrivatePhoneNumber]


Where do I set in properties the connection to different tables i.e. tbl_CompanyContact / tbl_PrivateContact and where the connection to the field CompanyPhoneNumber / PrivatePhoneNumber.

Thanks aktell

View 3 Replies View Related

Using MS Excel Connecting To MS Access?

Nov 13, 2005

I want to know if it possible to use MS Excel instead of web application (ASP, HTML,...) that is connected to MS Access and will update MS Access as user update information on MS Excel?

If it possible how I should get started b/c I kind of have a template for Excel. I just need to learn connecting excel to MS Access and maintain them.

View 14 Replies View Related

Connecting The Database To The Internet/Web Page

Apr 18, 2007

Hello!

I was wondering if someone could try and connect my database to the web. I would like to view the names of the CDs in her collection over the Internet.

My database is attached!

Thanks

View 3 Replies View Related

Connecting Remote Site (setup Help)

Mar 5, 2008

I just found out that this years project wil be setting up a remote office location. There will be about 5 users at this location. They want complete control over all equipment. What they have in place here is Terminal Services and thin clients.

Our db is Access front end with SQL backend.

My initial thought for the remote office is:
High Speed Internet
Either CAT5 to each desk or Wireless Access Point
5 thin clients.

Using RDP they should have no problem accessing our network unless they can't all use the same public IP address for our main office.

The other thought is Setting up a Point-to-point VPN. My biggest problem is I havn't worked with thin clients until I started working here. I don't know what I would need at the remote end in order to connect the thin clients through the VPN. They don't want any servers or desktops if we can help it.

Does any one have any suggestion or thoughts on this?

Thanks,
Dan

View 2 Replies View Related

Access Crashes Connecting To Odbc

Aug 16, 2006

I've just set up my Access on a new PC and now when I try to connect to my MySQL database through odbc, Access crashes without any error messages, just the standard microsoft error reporting message.

I'm using Office 2003. What do I do??

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved