SQL statement with variables in it?
SQL statement with variables in it?
SQL statement with variables in it?
SQL statement with variables in it?
SQL statement with variables in it?
SQL statement with variables in it? SQL statement with variables in it? SQL statement with variables in it? SQL statement with variables in it? SQL statement with variables in it? SQL statement with variables in it? SQL statement with variables in it? SQL statement with variables in it?
SQL statement with variables in it? SQL statement with variables in it?
SQL statement with variables in it?
Go Back  Xtreme Visual Basic Talk > > > SQL statement with variables in it?


Reply
 
Thread Tools Display Modes
  #1  
Old 05-21-2013, 10:42 PM
bonedoc bonedoc is offline
Junior Contributor
 
Join Date: Mar 2006
Posts: 376
Default SQL statement with variables in it?


So, I am doing some SQL statements to update some things in an access database. Like This:

UPDATE NOTES SET mydata = '" & thisdata & "'.......

I have used a variable in place of thisdata before. However, I have never used a variable in the place mydata. In other words, I want to be able to assign a value to the variable mydata and use this in the SQL statement to show which column I want to edit. Is this possible?
Reply With Quote
  #2  
Old 05-22-2013, 02:27 AM
DrPunk's Avatar
DrPunkSQL statement with variables in it? DrPunk is offline
Senior Contributor

* Expert *
 
Join Date: Apr 2003
Location: Never where I want to be
Posts: 1,403
Default

Err, of course it is.
Code:
UPDATE NOTES SET " & mydata & " = '" & thisdata & "'.......
__________________
There are no computers in heaven!
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

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
SQL statement with variables in it?
SQL statement with variables in it?
SQL statement with variables in it? SQL statement with variables in it?
SQL statement with variables in it?
SQL statement with variables in it?
SQL statement with variables in it? SQL statement with variables in it? SQL statement with variables in it? SQL statement with variables in it? SQL statement with variables in it? SQL statement with variables in it? SQL statement with variables in it?
SQL statement with variables in it?
SQL statement with variables in it?
 
SQL statement with variables in it?
SQL statement with variables in it?
 
-->