Hi All, I open a table from Sybase database that contains a column define as Date& Time. Yet, I see the date but not the time. How can I read also the time?
Also using MapBasic script how can I determine the computer's real time? Thanks David -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, March 14, 2006 5:57 PM To: [email protected] Subject: MapInfo-L Digest, Vol 5, Issue 31 Send MapInfo-L mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit http://www.directionsmag.com/mailman/listinfo/mapinfo-l or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than "Re: Contents of MapInfo-L digest..." Today's Topics: 1. [Spam] Startup behaviour difference - 4.5 vs 8.0 ([EMAIL PROTECTED]) 2. Insert (Simon Allen) 3. Re: Startup behaviour difference - 4.5 vs 8.0 (Uffe Kousgaard) 4. RE: Startup behaviour difference - 4.5 vs 8.0 (Spencer Simpson) 5. old legend (Nick Hall) 6. Creating Grids (Possberg, Hendrik) 7. RE: Callback in vb.net (AVD-ICT Milo van der Linden) ---------------------------------------------------------------------- Message: 1 Date: Tue, 14 Mar 2006 20:36:19 +0800 From: [EMAIL PROTECTED] Subject: [MI-L] [Spam] Startup behaviour difference - 4.5 vs 8.0 To: [email protected] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=US-ASCII I've recently upgraded from MI 4.5 to MI 8.0. With 4.5 I could have a workspace open in an instance of MI. If I then double-clicked on another *.tab file in a Windows folder, another instance of MapInfo would open to view the new tab file. With MI 8.0 it behaves differently. The new *.tab file opens up in the original instance of MapInfo - even in the same map if the table is mappable. Most annoying. Is there any way to get it to behave the same as MI 4.5 does? Or any workaround? Thanks, Dave ------------------------------ Message: 2 Date: Tue, 14 Mar 2006 12:55:52 -0000 From: "Simon Allen" <[EMAIL PROTECTED]> Subject: [MI-L] Insert To: <[email protected]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="us-ascii" Hi All I want a script that appends tables without knowing how many columns there are in the tables. Assume all tables ot be appended have the same number of columns. Open table LayerList.[ProcessFolder] + + "\" * tablesToAppend.[SrcTable] + ".tab" As "base"; noColumns = TableInfo(base, TAB_INFO_NCOLS); 'get number of columns While tablesToCopy.Read() { Open table LayerList.[ProcessFolder] + + "\" * tablesToAppend.[SrcTable] + ".tab" As "tabToAppend"; Insert Into base (COL1, COL2, COL3, .. noColumns) Select COL1, COL2, COL3, .. noColumns From tabToAppend; ';use number of columns to construct an SQL statement Close Table tabToAppend; } Commit Table base As .. Any idea how I would do this? Do I need to construct an Insert string and then run it in some way? Or can you INSERT without knowing the number of columns? Ta Simon Allen Senior GIS Officer [EMAIL PROTECTED] South Gloucestershire Council 01454 863655 (direct) 01454 863855 (fax) http://www.southglos.gov.uk <http://www.southglos.gov.uk/> ********************************************************************** This email and any files transmitted with it from South Gloucestershire Council are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the South Gloucestershire Council Postmaster at the address below. This footnote also confirms that this email message has been swept for the presence of computer viruses. [EMAIL PROTECTED] ********************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.directionsmag.com/pipermail/mapinfo-l/attachments/20060314/270a5d3b/attachment-0001.htm ------------------------------ Message: 3 Date: Tue, 14 Mar 2006 14:23:16 +0100 From: "Uffe Kousgaard" <[EMAIL PROTECTED]> Subject: Re: [MI-L] Startup behaviour difference - 4.5 vs 8.0 To: "Mapinfo-L" <[email protected]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Dave, I have MI 8.0 and love the functionality that you dislike so much :-) But, it has nothing to do with the version of MI, but is all about how the TAB extension is registered in the registry and behaviour changes as versions are installed, uninstalled etc. Unfortunately I can't remember how it should look to get the functionality that you want back. Perhaps you have another computer that behaves "correctly" and you can comparing the 2 registries (can be tedious work). Regards Uffe Kousgaard ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[email protected]> Sent: Tuesday, March 14, 2006 1:36 PM Subject: [MI-L] [Spam] Startup behaviour difference - 4.5 vs 8.0 > I've recently upgraded from MI 4.5 to MI 8.0. > > With 4.5 I could have a workspace open in an instance of MI. If I then > double-clicked > on another *.tab file in a Windows folder, another instance of MapInfo > would open to > view the new tab file. > > With MI 8.0 it behaves differently. The new *.tab file opens up in the > original instance > of MapInfo - even in the same map if the table is mappable. Most annoying. > > Is there any way to get it to behave the same as MI 4.5 does? Or any > workaround? > > Thanks, > > Dave > > _______________________________________________ > MapInfo-L mailing list > [email protected] > http://www.directionsmag.com/mailman/listinfo/mapinfo-l ------------------------------ Message: 4 Date: Tue, 14 Mar 2006 09:16:26 -0500 From: "Spencer Simpson" <[EMAIL PROTECTED]> Subject: RE: [MI-L] Startup behaviour difference - 4.5 vs 8.0 To: "'Mapinfo-L'" <[email protected]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="us-ascii" There's no need to dig into the registry. Instead, edit the "Open" action of the .TAB file type Using Windows Explorer (Tools -> Folder options, File types tab, click on the TAB extension, click on Advanced, select the "open" action", click on the "Edit button"). Since I'm not sure what the -noexec command line option does I can't guide you on what changes to make. Perhaps unchecking the "Use DDE" checkbox. Uffe's suggestion of comparing with a machine that has only MapInfo 4.5 is probably a good idea. Spencer -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Uffe Kousgaard Sent: Tuesday, March 14, 2006 8:23 AM To: Mapinfo-L Subject: Re: [MI-L] Startup behaviour difference - 4.5 vs 8.0 Dave, I have MI 8.0 and love the functionality that you dislike so much :-) But, it has nothing to do with the version of MI, but is all about how the TAB extension is registered in the registry and behaviour changes as versions are installed, uninstalled etc. Unfortunately I can't remember how it should look to get the functionality that you want back. Perhaps you have another computer that behaves "correctly" and you can comparing the 2 registries (can be tedious work). Regards Uffe Kousgaard ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[email protected]> Sent: Tuesday, March 14, 2006 1:36 PM Subject: [MI-L] [Spam] Startup behaviour difference - 4.5 vs 8.0 > I've recently upgraded from MI 4.5 to MI 8.0. > > With 4.5 I could have a workspace open in an instance of MI. If I then > double-clicked > on another *.tab file in a Windows folder, another instance of MapInfo > would open to > view the new tab file. > > With MI 8.0 it behaves differently. The new *.tab file opens up in the > original instance > of MapInfo - even in the same map if the table is mappable. Most annoying. > > Is there any way to get it to behave the same as MI 4.5 does? Or any > workaround? > > Thanks, > > Dave > > _______________________________________________ > MapInfo-L mailing list > [email protected] > http://www.directionsmag.com/mailman/listinfo/mapinfo-l _______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l ------------------------------ Message: 5 Date: Tue, 14 Mar 2006 14:17:14 -0000 From: "Nick Hall" <[EMAIL PROTECTED]> Subject: [MI-L] old legend To: <[email protected]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="iso-8859-1" Sorry to post this but I can never, ever find anything in the archives on directionsmag.com and I know this will have been discussed/answered hundreds of times but I cant remember what it is!!! A client using 7.5 has that legend cropping/missing problem - i.e. cant see bottom bit of legend on a layout. I cant replicate it in V8 but how do you solve it in 7.5? Thanks Nick Hall -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 268.2.2/280 - Release Date: 13/03/2006 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.directionsmag.com/pipermail/mapinfo-l/attachments/20060314/63521fcd/attachment-0001.htm ------------------------------ Message: 6 Date: Tue, 14 Mar 2006 16:40:44 +0100 From: "Possberg, Hendrik" <[EMAIL PROTECTED]> Subject: [MI-L] Creating Grids To: "Mapinfo-List (E-Mail)" <[email protected]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="iso-8859-1" Dear List, What do i need to create a custom grid? Is it possible to create a grid for whole Germany with cells of 1 squarekilometer. I am using Mapinfo 8.0 and also have Vertical Mapper 2.6. Thanks in Advance. Mit freundlichen Gren Hendrik Poberg Manager Geodaten Tel. +49 (0)2131 109-751 Fax +49 (0)2131 109-777 mailto:[EMAIL PROTECTED] microm Micromarketing-Systeme und Consult GmbH Hellersbergstrae 14 41460 Neuss www.microm-online.de Abonnieren Sie kostenlos das aktuelle microMagazin. In jedem Quartal erhalten Sie aktuelle Informationen ber die neuesten Entwicklungen bei microm, unseren Partnern und Kunden. Einfach online bestellen unter www.microm-online.de! _________________________________ Diese Nachricht wurde elektronisch versandt und ist daher auch ohne Unterschrift rechtsgltig. Der Inhalt dieser E-Mail enthהlt vertrauliche Informationen. Das Kopieren und die Weitergabe an Dritte ist nicht gestattet. Sollten Sie diese E-Mail irrtmlich von uns erhalten haben, bitten wir Sie, diese zu vernichten und uns darber zu informieren. Im Voraus vielen Dank. _________________________________ ------------------------------ Message: 7 Date: Tue, 14 Mar 2006 16:54:13 +0100 From: "AVD-ICT Milo van der Linden" <[EMAIL PROTECTED]> Subject: RE: [MI-L] Callback in vb.net To: "'Christian Singer'" <[EMAIL PROTECTED]>, <[email protected]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="iso-8859-1" Hello Christian (list), You answered my previous question on callbacks, so I hope you don't find it rude that I ask you one more. I have the callback up and running and manage to get the "click" event in MapInfo into a msgbox. I am also able to show the statustext on the statusbar. However, When I store the returnd X and Y coordinates from the callback in a variable and call another form with it, my newly opened form hangs. I have been searching myself a roundtrip in the world of threading, invoke and marshalling, but I cannot get it running. Any ideas of how I can make the callback function end up in the same thread as my main application? Kind regards, Milo van der Linden -----Oorspronkelijk bericht----- Van: AVD-ICT Milo van der Linden [mailto:[EMAIL PROTECTED] Verzonden: woensdag 1 maart 2006 11:35 Aan: 'Christian Singer'; '[email protected]' Onderwerp: SUM: [MI-L] Callback in vb.net Thank you Christian! What you described did the trick. At first I still received errors, but when I did the class library - Windows aplication switch, everything worked just fine! I appreciate the solution, thanks again! Milo van der Linden -----Oorspronkelijk bericht----- Van: Christian Singer [mailto:[EMAIL PROTECTED] Verzonden: dinsdag 28 februari 2006 10:57 Aan: [email protected] CC: [EMAIL PROTECTED] Onderwerp: Re: [MI-L] Callback in vb.net At 13:23 24.02.2006 +0100, Milo van der Linden wrote: >Hello list. > >I created a nice integrated mapping solution in vb.net, with this I can >- Open a workspace >- Zoom in/Zoom out >- Resize my Mapwindow > >What you need to do in VS 2005 is: >1. Add a picturebox to a form >2. Dock this picturebox to the form > >And then implement the following sample code to the form ... >I am now at the point where I want to responde to a mouse click in my >Mapwindow for this I try to use a callback: > >Mycallback is a class I created. However, with no change I can get this >class to respond to SetStatusText and WindowChanged > >Is there anybody that knows if there are some things I am ovelooking? > Even though I'm not quite sure as to what the problem exactly is with your callback function (was not included in your sample code), here is the complete code for a very simple Visual Basic .NET app, using two MI OLE callback functions (receiving status text and custom tool input event notification): Form1 contains the map window (PictureBox, "pbMap") and a text box ("tbStatus"), displaying the contents of the status line. ''''''''''''' Begin of VBN code ''''''''''''''''''''''''''''''''''' Public Class Form1 ' The MapInfo OLE object: Private mi As Object ' The object implementing the COM/OLE2 automation server as ' the target of the callbacks originating from the MI OLE object: Private comServObj As New ComClass1 ' A shared object reference to the status text control for ' later access within the status text callback function: Public Shared tbStatObj As Object Public Sub New() ' Initialize main form (built with VS Form Designer): InitializeComponent() ' Save persistent (shared) obj ref to status text control: tbStatObj = Me.tbStatus ' Create and configure the MI COM object, open a map etc.: mi = CType(CreateObject("MapInfo.Application"), MapInfo.DMapInfo) mi.do("Set Application Window " & CType(Me.pbMap.Handle, String)) mi.do("Set Next Document Parent " & CType(Me.pbMap.Handle, String) _ & " Style 1") mi.do("Open Table ""c:\maps\world.tab"" Interactive Map From World") mi.Do("Set Map Display Position") mi.Do("Create Buttonpad ""SelectGeneric"" As Toolbutton ID 785 " _ & "DrawMode 34 Cursor 134 Calling OLE ""SelectGeneric""") mi.Do("Run Menu Command ID 785") mi.SetCallback(comServObj) End Sub End Class ' Register this class as a COM/OLE2 class: <ComClass(ComClass1.ClassId, ComClass1.InterfaceId, ComClass1.EventsId)> _ Public Class ComClass1 ' Unique IDs for this COM app interface: Public Const ClassId As String = "9CC9946D-C1E4-4f42-9E8C-C4693BD04577" Public Const InterfaceId As String = "CC6697F7-968D-47dc-9B5B-84DEF8FD5D6B" Public Const EventsId As String = "2A765F7E-E628-4427-A730-A695543EDB79" Public Sub New() MyBase.New() End Sub ' Callback function receiving the contents of the MapInfo status line, ' when changed: Public Sub SetStatusText(ByVal strStatus As String) ' Show status line text in text box: CType(Form1.tbStatObj, Control).Text = strStatus End Sub ' Callback function for notification of user input events ' generated by the custom tool (ID 785, see above): Public Sub SelectGeneric(ByVal str As String) MessageBox.Show("A user input event occurred with the parameters:" _ & vbCrLf & str, "MI Custom Tool Callback") End Sub End Class ''''''''''''' End of VBN code ''''''''''''''''''''''''''''''''''' This has been tested with Visual Studio 2005 / .NET Framework 2.0 However, this application does not run properly in debugging mode (started with F5), so must be started either from outside the VS environment or with Ctrl-F5. In the 'Project settings ...' > 'Compile options' you have to activate the 'Register for COM Interop' option. Unfortunately, this option is disabled for standard Windows programs, so you might have to switch to the project type 'class library' first, then set this option, and then again change the project type to 'Windows EXE'. Regards, Christian Singer Ing.-Bro Christian Singer Singerhoffstr. 14 44225 Dortmund Germany E-mail: [EMAIL PROTECTED] WWW : www.icsinger.de Phone : +49 231 791464 Fax : +49 231 791460 ------------------------------ _______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l End of MapInfo-L Digest, Vol 5, Issue 31 **************************************** --------------------------------------------------------------------------------------------------------------- This message contains information that may be confidential or privileged. If you are not the intended recipient, you may not use, copy or disclose to anyone any of the information in this message. If you have received this message and are not the intended recipient, kindly notify the sender and delete this message from your computer. _______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l
