I am running the .NET VB Business Entity template on my Windows 7 SQL Server 2008 setup and I cannot get the template to process properly. It always hangs on the following code:
"For Each objColumn in objView.Columns" and also..
"For Each objColumn in objView.PrimaryKeys"
stating error: Object doesn't support this property or method.
I am guessing it is not retrieving the table object properly but am at a loss to fix this issue??
I get the following error dump in the console:
20/05/2011 9:22:54 PM - Opened Template: "dOOdads Business View" from "C:\Program Files (x86)\MyGeneration13\Templates\VB.Net\VbNet_SQL_dOOdads_View.vbgen".
20/05/2011 9:23:03 PM - ZeusRuntimeException: Template Runtime Exception - at Zeus.ZeusExecutioner.ExecuteCode(IZeusExecutionHelper helper, IZeusTemplate template, IZeusContext context, ArrayList templateGroupIds)
at Zeus.ZeusExecutioner.ExecuteCode(IZeusCodeSegment segment, IZeusContext context)
at Zeus.ZeusExecutioner.ExecuteCodeSegment(IZeusCodeSegment segment, IZeusContext context)
at Zeus.ZeusCodeSegment.Execute(IZeusContext context)
At the moment I have to run MyGen on my laptop (Vista) to generate the code and import it back over to my production PC. I did install an earlier version of MyGeneration not knowing that it was not compatible with Windows 7 - would the subsequent install of the correct version be screwing around with registry settings??
At a loss,
I am having the same issue windows 7
It just does not generate any class or procedure files
Even on a xp machine i am having a issue
For Each objColumn in objTable.Columns --------> failing on this line
if objColumn.Default = "newid()" Or objColumn.Default = "GenGUID()" Then
output.writeLn "Me." + GetAlias(objColumn) +" = Guid.NewGuid()"
error = Object doesn't support this property or method
my table have just three columns (loginname (PrimaryKey), password (varchar(50), usertype (varchar(20))
I had the same issue a few months ago and the only way that I found to overtake this was changing the For Each Instance.
This should work for you.
Public Overrides Sub AddNew()
<% ' SQL Server and Access tweak here
For intX = 0 to objTable.Columns.Count -1
if objTable.Columns(intX).Default = "newid()" Or objTable.Columns(intX).Default = "GenGUID()" Then
output.writeLn "Me." + GetAlias(objTable.Columns(intX)) +" = Guid.NewGuid()"
and so on.
I had the same issue and further problems which I discussed and replied to on another thread. I updated my script template as follows and the script would run correctly:
For intX = 0 to objTable.Columns.Count-1
set objColumn = objTable.Columns(intX)
This appears to be an issue running on 64 bit windows. I have 2 computers and the 32 bit version works without modification. Can anyone else confirm this?