| | |
vb6 sql to access
![]() |
•
•
Join Date: Mar 2008
Posts: 1
Reputation:
Solved Threads: 0
I have the following sql statement in VB6 (latest VB SP, Win XP, SP2) that works fine in ado to sql server 2k5 but does not work in ado to access 2k3. "Select ID, Make, Model, PlsPerBBL, Size, Processor, Location, From MeterData Where MeterNo = 'FQ-805 8" IN'". I know it has a double quote for inches in the MeterNo string, but running the query directly in access works fine. This sql is querying 2 different tables. The one in SQL Server has the ID field as an identity primary key that is seeded with a 1 and incremented by 1 each record, integer data type. The other table is in Access and the ID field is a primary key but is not an auto number data type, it is a long integer. The reason for this is that the Access database contains the same data as the SQL Server database but must be used when the laptop is disconnected from the network where the SQL Server DB is located then added/changed data is uploaded when reconnected to the network. In order to control the SQL Server identity primary key and copy the data to the access database, I could not use an auto number field for the primary key in the Access table.
Help please! rcox@eprod.com
Help please! rcox@eprod.com
vb Syntax (Toggle Plain Text)
'this is your string "Select ID, Make, Model, PlsPerBBL, Size, Processor, Location, From MeterData Where MeterNo = 'FQ-805 8" IN'"
vb Syntax (Toggle Plain Text)
'correction "Select ID, Make, Model, PlsPerBBL, Size, Processor, Location From MeterData Where MeterNo = 'FQ-805 8 IN'"
Last edited by cometburn; Mar 18th, 2008 at 4:17 am.
Proud to be Philippine made...
![]() |
Similar Threads
- How to launch a Crystal 11 report from VB6 (Visual Basic 4 / 5 / 6)
- VB6 Database Program (Visual Basic 4 / 5 / 6)
- how to create new table in MS Access2003 database using VB6 (Visual Basic 4 / 5 / 6)
- Attach the desired database - SQL Server - Setup Factory 7 (MS SQL)
- USING CLASSES in VB6 (Visual Basic 4 / 5 / 6)
- Can we Programaticall Write code in VB6.0, forms/standard module/class code window (Visual Basic 4 / 5 / 6)
- How can i access Time from Server ? (Visual Basic 4 / 5 / 6)
- request for ansi sql queries equalent to MS access (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: computer process
- Next Thread: Pen drive file restore
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






