Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Database and Reporting > basic INSERT


Reply
 
Thread Tools Display Modes
  #1  
Old 04-07-2004, 02:54 PM
gomez gomez is offline
Freshman
 
Join Date: Feb 2004
Posts: 34
Default basic INSERT


Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\D&M.mdb" & ";Persist Security Info=False"
conn.CursorLocation = adUseClient
conn.Open
conn.Execute ("INSERT INTO RestZone(PhoneNumber) VALUES('2342342')")
conn.Close
Set conn = Nothing

my understanding of the SQL statement: RestZone = Name of table; PhoneNumber = Column in table; '2342342' = the value stored in table RestZone in Column PhoneNumber.. is this correct? If so, why do i keep getting "unknown field name: 'PhoneNumber'" it is spelled correctly.

/any ideas? thanks
Reply With Quote
  #2  
Old 04-07-2004, 02:56 PM
gomez gomez is offline
Freshman
 
Join Date: Feb 2004
Posts: 34
Default

lesson learned: make sure you refer to the correct table before asking stupid questions
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick way to insert into SQL Server CT04 Database and Reporting 2 03-21-2004 10:36 AM
INSERT INTO statement - inserting 2 different values into 2 different fields VBKid04 Database and Reporting 4 03-11-2004 09:09 PM
SQL INSERT command flynn General 1 02-05-2004 01:24 PM
Insert of a new row by different users UltimoAmore Database and Reporting 4 11-18-2003 08:27 AM
show that everything is working not crashing mkaobrih Excel 8 08-05-2003 10:27 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->