Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2005

Tip: Looking for answers? Try searching our database.

SQL string

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kon - 29 Nov 2005 23:07 GMT
How can I insert into a table value witch is
for example 12,3 while it takes it as 2 different values in a sql string (I
don't wont the value to converted to string but keep is as double)

Thank in advace
Ken Snell (MVP) - 29 Nov 2005 23:19 GMT
Show us what you're trying to use now. That will help us see what you're
doing and what might need to be changed.

Signature

       Ken Snell
<MS ACCESS MVP>

> How can I insert into a table value witch is
> for example 12,3 while it takes it as 2 different values in a sql string
> (I don't wont the value to converted to string but keep is as double)
>
> Thank in advace
kon - 30 Nov 2005 14:43 GMT
   Dim codecustomer, sqlstring As String
           codecustomer = rslist.Fields("code")
           sqlstring = " INSERT INTO difference ( custcode, residual,
total ) values ('" & codecustomer & "'," & residual & "," & total & ")"
           DoCmd.RunSQL sqlstring
   Residual or total might be 12,2 so it takes as 2 values
How can I change my sqlstring to bypass the problem?

> Show us what you're trying to use now. That will help us see what you're
> doing and what might need to be changed.
[quoted text clipped - 4 lines]
>>
>> Thank in advace
Ken Snell (MVP) - 30 Nov 2005 16:53 GMT
Enclose the values inside ' characters:

           sqlstring = " INSERT INTO difference ( custcode, residual,
total ) values ('" & codecustomer & "', '" & residual & "', '" & total &
"')"

Signature

       Ken Snell
<MS ACCESS MVP>

>    Dim codecustomer, sqlstring As String
>            codecustomer = rslist.Fields("code")
[quoted text clipped - 12 lines]
>>>
>>> Thank in advace
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.