Re: 4GL question
Posted in 2004
This is a multi-part message in MIME format. ------=_NextPart_000_0045_01C3E5BC.1553C650 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Howard, In the past I have used a technique of prompting for a database name and = opening the database using the character string returned. And guess = what? It still works. You don't even need the @servername. And you = don't even need to close the old one. =20 regards Malcolm (some of us oldies still use 4GL) ----- Original Message -----=20 From: Howard Salter=20 To: informix-list@iiug.org=20 Sent: Wednesday, January 28, 2004 2:50 PM Subject: 4GL question Hello all, I'm writing a 4GL report, and I need it to span several databases that = all have matching tables and structures, it's just the info in the = tables that's different. I know I could add the database name to the = FROM statement in each of my selects, but I was hoping there was a way = to do create a DATABASE statement using a variable name. That way I = wouldn't have to change the SQL statements and add the CLOSE and FREE = statements for each cursor and prep statement. TIA, Howard ------=_NextPart_000_0045_01C3E5BC.1553C650 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2800.1276" name=3DGENERATOR> <STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in = 1.25in; } P.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } LI.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } DIV.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } A:link { COLOR: blue; TEXT-DECORATION: underline } SPAN.MsoHyperlink { COLOR: blue; TEXT-DECORATION: underline } A:visited { COLOR: purple; TEXT-DECORATION: underline } SPAN.MsoHyperlinkFollowed { COLOR: purple; TEXT-DECORATION: underline } SPAN.EmailStyle17 { COLOR: windowtext; FONT-FAMILY: Arial } DIV.Section1 { page: Section1 } </STYLE> </HEAD> <BODY lang=3DEN-US vLink=3Dpurple link=3Dblue bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Howard,</FONT></DIV> <DIV><FONT face=3DArial size=3D2>In the past I have used a technique of = prompting=20 for a database name and opening the database using the character string=20 returned. And guess what? It still works. You don't = even need=20 the @servername. And you don't even need to close the old = one. =20 </FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>regards</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Malcolm</FONT></DIV> <DIV><FONT face=3DArial size=3D2>(some of us oldies still use = 4GL)</FONT></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A title=3DHowardSalter@penningtonseed.com=20 href=3D"mailto:HowardSalter@penningtonseed.com">Howard Salter</A> = </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A = title=3Dinformix-list@iiug.org=20 href=3D"mailto:informix-list@iiug.org">informix-list@iiug.org</A> = </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Wednesday, January 28, = 2004 2:50=20 PM</DIV> <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> 4GL question</DIV> <DIV><BR></DIV> <DIV class=3DSection1> <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hello = all,</SPAN></FONT></P> <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P> <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">I'm writing a 4GL = report, and I=20 need it to span several databases that all have matching tables and=20 structures, it's just the info in the tables that's different. I know = I could=20 add the database name to the FROM statement in each of my selects, but = I was=20 hoping there was a way to do create a DATABASE statement using a = variable=20 name. That way I wouldn't have to change the SQL statements and add = the CLOSE=20 and FREE statements for each cursor and prep = statement.</SPAN></FONT></P> <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P> <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">TIA,</SPAN></FONT></P> <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT> </P> <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: = Arial">Howard</SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_0045_01C3E5BC.1553C650-- sending to informix-list