Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Using the laffdb extender, I can write out a database field with a href link in it (including quotes), however when I read the field back, I loose my quotes, and the record is truncated.
Any ideas?
Here is my sample code to recreate this
AddExtender("laffd34i.dll") FileName = "c:\temp\test.db" delimiter = "|" bCreateOK = 1 ; if file does not exist, create an empty database. model = 2 ; traditional numcols = -1 ; number of columns format = 0 optionstring = "" handle = dbOpen (FileName, bCreateOK, model, numcols, format, delimiter, optionstring) If handle == @LAFFDBERROR err = dbGetLastError() Message("Error Opening the database specified", err) bErrorLevel = -1 Else For RecordNum = 1 To 2 ret = dbBindCol(handle, 1, "Name") ret = dbBindCol(handle, 2, "Descriptions") If ret == @LAFFDBERROR err = dbGetLastError() Message("Error Binding the column", err) bErrorLevel = -2 Else ret = dbGetEntireRecord(handle, RecordNum, 1) If ret == @LAFFDBERROR ;Don't say if we can't read the record ;err = dbGetLastError() ;Message("Error getting entire record", err) bErrorLevel = -3 Else If RecordNum == 1 Then Message('Record 1 works fine',StrCat(Name,@TAB,Descriptions)) Else Message('Record 2 line should be [<a href="e:\temp\test.txt">tester</a> is a test]',StrCat(Name,@TAB,Descriptions)) End If End If End If Next xloop ret = dbClose(handle) End If Exittest.db should look like this
Name|Descriptions test|Really Big Line Of Text!!!!!!! Really Big Line Of Text!!!!!!! test|<a href="e:\temp\test.txt">tester</a> is a test
var=StrReplace(var,'"','""')
I could replace the '"' with @, however if someone enters a legitimate @ in their comment, the next time, I may replace that with a '"'.
Weird that is can write out quotes with no problem, but not read them!
Maybe you could add this caveat to the help file so other's like me don't tread down this path.
Example:
123,John Doe,Bellevue 12d,"Flintstone,Fred",45,"1,000.00","GratuitiousQuotesAreLegal"
A space or multiple spaces. Text fields with multiple words must use quote marks to indicate a single column. Quotes within a field are represented by two ajoining quotes
Example:
123 “John Doe” Bellevue "Yes ""She said"""
Article ID: W16829
File Created: 2007:07:03:14:26:28
Last Updated: 2007:07:03:14:26:28