<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div>
<div dir="ltr">
<div dir="ltr">No, I’m only using Cuis. I just don’t use that old odbc package. If there is no FFI method implemented that would call SQLColumns then you would need to enhance the package to add that support yourself. Alternatively you might be able to execute
a query that is guaranteed to answer an empty set and pull the column information from it. You can do this like this: select * from my_table where 1 = 0<span></span><span></span></div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Jon</div>
</div>
</div>
<div id="ms-outlook-mobile-signature">
<div></div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Mark Volkmann <r.mark.volkmann@gmail.com><br>
<b>Sent:</b> Tuesday, November 5, 2024 7:57:50 PM<br>
<b>To:</b> Jon Raiford <raiford@labware.com><br>
<b>Cc:</b> Discussion of Cuis Smalltalk <cuis-dev@lists.cuis.st><br>
<b>Subject:</b> Re: [Cuis-dev] DatabaseSupport ODBC and getting table schema info</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>In the Cuis ODBC package, I think all communication with the ODBC driver happens in the instance methods of the ODBCLibrary class. I don't see any methods there that query a table to get information about its columns.</div>
<div>
<div><br>
</div>
<div>Are you working with ODBC in Squeak?</div>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Mon, Nov 4, 2024 at 7:27 PM Jon Raiford <<a href="mailto:raiford@labware.com">raiford@labware.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left-width:1px; border-left-style:solid; border-left-color:rgb(204,204,204); padding-left:1ex">
<div>
<div dir="ltr">
<div>
<div dir="ltr">Although i don’t know that package well<span> enough to say how to do it, i can tell you the correct way to fetch column information is to call
<span id="x_m_5998321971403503929ms-outlook-ios-cursor"></span>SQLColumns (<a rel="noreferrer noopener" href="https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqlcolumns-function?view=sql-server-ver16" target="_blank">https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqlcolumns-function?view=sql-server-ver16</a>).
Note that current Cuis odbc package is very old and maybe uses the v1 calls. I'm not sure how or if that would affect things. <span></span></span></div>
</div>
<div dir="ltr"><span><br>
</span></div>
<div dir="ltr"><span>Jon </span></div>
<div dir="ltr" id="x_m_5998321971403503929ms-outlook-mobile-signature">
<div dir="ltr"></div>
</div>
</div>
<hr style="display:inline-block; width:98%">
<div id="x_m_5998321971403503929divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Cuis-dev <<a href="mailto:cuis-dev-bounces@lists.cuis.st" target="_blank">cuis-dev-bounces@lists.cuis.st</a>> on behalf
of Mark Volkmann via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>><br>
<b>Sent:</b> Monday, November 4, 2024 8:17:42 PM<br>
<b>To:</b> Discussion of Cuis Smalltalk <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>><br>
<b>Cc:</b> Mark Volkmann <<a href="mailto:r.mark.volkmann@gmail.com" target="_blank">r.mark.volkmann@gmail.com</a>><br>
<b>Subject:</b> [Cuis-dev] DatabaseSupport ODBC and getting table schema info</font>
<div> </div>
</div>
<div>
<div dir="ltr">I've been searching the code for the ODBC package and haven't found a way to get information about the columns in a given table including their names and data types. I can get that from a row from a result set, but I don't see a way to do it
for an empty table. Am I overlooking it?<br clear="all">
<div><br>
</div>
<span>-- </span><br>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div><font face="arial, helvetica, sans-serif">R. Mark Volkmann</font></div>
<div><span style="font-size:12.8px"><font face="arial, helvetica, sans-serif">Object Computing, Inc.</font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<div><br clear="all">
</div>
<div><br>
</div>
<span class="x_gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="x_gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div><font face="arial, helvetica, sans-serif">R. Mark Volkmann</font></div>
<div><span style="font-size:12.8px"><font face="arial, helvetica, sans-serif">Object Computing, Inc.</font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>