sql - vbScript - InputBox into .accdb , blank? -



sql - vbScript - InputBox into .accdb , blank? -

after 9 hours of research , trial , error, i've come of current issue having script wrote input info database. i'll simplify focal point of problem in code view. have 3 fields, 1 timestampe @ end of sql such .... & now() & "')". inserts find, variable inputboxes insert blank data.

option explicit dim ib dim sql1, constring, con constring="provider=microsoft.ace.oledb.12.0;data source=c:\users\user\documents\database1.accdb;" sql1="insert table1 (column1) values('" & ib & "')" set con = createobject("adobd.connection") con.open constring ib=inputbox("input data") if ib="quit" or ib="quit" con.close else con.execute sql1 end if loop while ib<>"quit" , ib<>"quit"

it appending rows database, blank. ive designed table take short text of <255 chars.

i ran test query within database , inserts tell to, inputbox data, reason, not making table.

this

sql1="insert table1 (column1) values('" & ib & "')"

concats (empty) ib sql1 before loop. con.execute sql1 insert database until quit.

try

con.execute "insert table1 (column1) values('" & ib & "')"

and optimize when works.

sql ms-access vbscript insert

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -