Power Builder - Exportar Dw sin comillas

 
Vista:

Exportar Dw sin comillas

Publicado por Davidpy (97 intervenciones) el 26/04/2009 21:58:04
Hola a todos..

Tengo un problema que no he podido resolver.. hice una aplicación que genera los codigos para los triggers de mi base de datos.. estos codigos los guardos en mi base de datos y luego lo quiero generar en archivo de texto...

Mi problemas es que cuando utilizo el saveas.. me genera el archivo.. pero en la columna de la setencian me coloca unas comillas como extremos del codigo.. por ejemplo..

"esta es mi sentencia"

y yo lo necesito sin comillas.. que quede solo

esta es mi sentencia

para luego poder ejecutarlos

alguien sabe como puedo hacer el saveas sin las comillas en los extremos???

Muchas gracias a todos y saludos desde Paraguay..
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Exportar Dw sin comillas

Publicado por amilcar (407 intervenciones) el 27/04/2009 18:53:00
prueba con dw_1.saveas("C: uarchivo.txt",text!,false)

espero te sirva
saludos desde argentina
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Exportar Dw sin comillas

Publicado por Davidpy (97 intervenciones) el 27/04/2009 19:18:11
Esa misma sentencia es la que utilizo y me da el problema que comento..

De igual manera, gracias por responder..
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Exportar Dw sin comillas

Publicado por Francisco Tanori (2 intervenciones) el 03/05/2009 02:01:01
No se que version utilices Con el Metodo

Pero en almenos es las versiones 8 y 10 (que son donde las he comprobado ahora), puedes user el metodo

SaveAsAscii , donde puedes establecer caracteres de separcion y entrecomillado

Ejemplo:

dw_productos.SaveAsAscii("C:/productos.txt","+","$")

Los registros me los dara asi:

$00001$+$Impresora HP$+$3000$

Por lo tanto si no quieres que te lo encierre en ningun caracter, dejas el ultimo parametro con una cadena vacia

dw_productos.SaveAsAscii("C:/productos.txt","+","")

00001+Impresora HP+3000

Separado por comas y sin entrecomillar
dw_productos.SaveAsAscii("C:/productos.txt","v","")

00001,Impresora HP,3000

Ayuda de PB 10 ----------------
Description

Saves the contents of a DataWindow or DataStore into a standard ANSI text file.

Controls

DataWindow type Method applies to
PowerBuilder DataWindow control, DataStore object
Syntax
PowerBuilder

long dwcontrol.SaveAsAscii ( string filename {, string separatorcharacter {,string quotecharacter {, string lineending {, boolean retainnewlinechar } } } } )

Argument Description
dwcontrol A reference to a DataWindow control or DataStore.
filename A string whose value is the name of the file in which to save the contents.
separatorcharacter (optional) A string whose value is the character to be used to delimit values. If you omit separatorcharacter, the default is a tab character.
quotecharacter (optional) A string whose value is the character to be used to wrap values. If you omit quotecharacter, the default is double quote.
lineending
(optional) A string whose value is placed at the end of each line. If you omit lineending, the default is a carriage return plus a newline character (~r~n).
retainnewlinechar (optional) A boolean value that determines whether line feed and carriage return characters contained within the row are converted to white space. Values are:true - line feed and carriage return characters within the row are not converted to white space false (default) - line feed and carriage return characters within the row are converted to white space
Return value

Returns 1 if it succeeds and -1 if an error occurs.

Usage

SaveAsAscii always saves the file with ANSI encoding. To save to a file with a different encoding, use SaveAsFormattedText.
SaveAsAscii is like SaveAs with the Text SaveAsType. However, unlike SaveAs, SaveAsAscii formats the text and saves column headers in the form in which they are displayed in the DataWindow instead of as the column name. For example, if the heading for the cust_id column is Customer ID, SaveAsAscii saves Customer ID to the text file, whereas SaveAs saves cust_id. SaveAsAscii also saves computed fields allows you to customize formats in the file. If you do not specify custom settings, values are wrapped in double quotes and separated by tabs. A newline character (~r~n) is placed at the end of each line. Line feed and carriage return characters within each row are converted to white space.

PowerBuilder assigns a cell for each DataWindow object (which can include computed columns and group totals). If a cell is empty, PowerBuilder puts the quotecharacter between the separatorcharacter in the output file.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Exportar Dw sin comillas

Publicado por robert (1 intervención) el 22/02/2023 01:02:40
muchisimas quiza sea tarde pero es exactamente lo q necesitaba
Dios te bemdiga
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar