objConn = New ADODB.Connection
objConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Dat a Source=" & dbPath _
& ";Jet OLEDB:Database Password=" & dbPassword)
This cause error: (VB.NET. )
sqlString = "insert into table1 " _
& "(Date1,Time,Ext,Co) values " _
& "('04/04/05','06:02PM','101','01');"
But below is fine
sqlString = "insert into table1 " _
& "(Date1,'Time1,Ext,Co) values " _
& "('04/04/05','06:02PM','101','01');"
That is , if I change the Access Table filed name
from "Date" -> Date1
"Time" -> "Time1". Then the above code run through fine.
But in my VB6 code before, I used the same TABLE Field Name and it works.
(That was a different VB project, of course) 2 4527
Try enclosing Date and Time inside Square Brackets [Date], [Time] as they
are reserved words.
Doug
"devprog" <de*****@nospam.nospam> wrote in message
news:OX**************@TK2MSFTNGP15.phx.gbl... objConn = New ADODB.Connection objConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Dat a Source=" & dbPath _ & ";Jet OLEDB:Database Password=" & dbPassword)
This cause error: (VB.NET. )
sqlString = "insert into table1 " _ & "(Date1,Time,Ext,Co) values " _ & "('04/04/05','06:02PM','101','01');" But below is fine
sqlString = "insert into table1 " _ & "(Date1,'Time1,Ext,Co) values " _ & "('04/04/05','06:02PM','101','01');"
That is , if I change the Access Table filed name from "Date" -> Date1 "Time" -> "Time1". Then the above code run through fine.
But in my VB6 code before, I used the same TABLE Field Name and it works. (That was a different VB project, of course)
Hi Bell,
Thanks so much for the helping.
"Doug Bell" <du*@bigpond.com> wrote in message
news:ed**************@tk2msftngp13.phx.gbl... Try enclosing Date and Time inside Square Brackets [Date], [Time] as they are reserved words.
Doug "devprog" <de*****@nospam.nospam> wrote in message news:OX**************@TK2MSFTNGP15.phx.gbl... objConn = New ADODB.Connection objConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Dat a Source=" & dbPath _ & ";Jet OLEDB:Database Password=" & dbPassword)
This cause error: (VB.NET. )
sqlString = "insert into table1 " _ & "(Date1,Time,Ext,Co) values " _ & "('04/04/05','06:02PM','101','01');" But below is fine
sqlString = "insert into table1 " _ & "(Date1,'Time1,Ext,Co) values " _ & "('04/04/05','06:02PM','101','01');"
That is , if I change the Access Table filed name from "Date" -> Date1 "Time" -> "Time1". Then the above code run through fine.
But in my VB6 code before, I used the same TABLE Field Name and it
works. (That was a different VB project, of course)
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jeremy |
last post by:
I am relatively inexperienced with SQL, and I am trying to learn how
to analyze some data with it.
I have a table with the following information.
COMPANY ID , DATE, MarektValue
I would like...
|
by: Larry R Harrison Jr |
last post by:
I have an Access 97 database with 2 tables that have a one-many
relationship. I have a SQL statement in the "one" table which I want to
execute and insert 7 records into the "many" table, and I...
|
by: |
last post by:
Hello,
I am hoping someone else has thought about a date time calculation i need to
perform.
I would like to be able to calculate the number of "working minutes" between
2 dates, given my...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
| |