Jump to content

Another crazy thing Sqlit3 issues


Recommended Posts

OK I have a multiline text field that looks like

DESCRIPTION: 

STORE ACTIVITY: 
TIME PERIOD: 0 hours until open

blah blah blah

I can pull the thing nicely from the database but what I want to do is place a marker that after it is ran a variable would be entered

something like

DESCRIPTION: $Descinput

STORE ACTIVITY: 
TIME PERIOD: 0 hours until open

blah blah blah

where $Descinput would be data provided by the user.

I tired all manners of escaping the thing in the database and cant figure out what to put in the database itself to enable a variable that will be provided later.

Every time I run the query i just get back exactly what is in the database.

Is this even possible?

Please help

This is the sample of my query from the script

#include <SQLite.au3>
#include <SQLite.dll.au3>
$Database = "clientassist.s3db"
$temp = "'General'"
$Description = "Testing1234"
_SQLite_Startup()
_SQLite_Open($Database); open Database
_SQLite_Query(-1, "Select template from TEMPLATES where TemplateType = " & $temp & ";", $hQuery); the query
While _SQLite_FetchData($hQuery, $aRow) = $SQLITE_OK
    $_Queryresults &= $aRow[0]
;$_Queryresults &= "|"
WEnd
    _SQLite_Close()
    _SQLite_Shutdown()
MsgBox(0, "Test", $_Queryresults)
Link to comment
Share on other sites

StringReplace() and then update the record?

$_Queryresults = StringReplace($_Queryresults, "DESCRIPTION: " & @CR, "DESCRIPTION: " & $Description & @CR, 1)

:P

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...