Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

SQL Query - Insert into Control table


4 replies to this topic

frtr

frtr
  • Members
  • 10 posts

Posted 31 August 2004 - 20:40

Hi!

I am trying to insert a new row inside the Control Table. When I enter it manually in Orca there is no problem adding a row, but my SQL query fails for a reason that I ignore.

All other queries works, even those I use for updating a row inside the control table ( Actually, i can update width and type without problem )

Here is my query :

QUOTE
"INSERT INTO `Control` VALUES 'CustomTextA','BrowseButton','PushButton','325','120','84','18','3','','{\VSI_MS_Sans_Serif13.0_0_0}&Browse...','','|')"


As you may see, I am trying to add a BrowseButton to an edit box in the CustomTextA. If you know a simpler way then adding manually a browse button in the control table and other rows in controls events, etc. please feel free to discuss it here biggrin.gif

Note : I use Microsoft Visual Studio .net without any authorwares... It's why I use some automated SQL queries as postbuild events on my msi file.

Thanks all for you help!

François Tremblay

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 01 September 2004 - 04:29

How are you running this code?? maybe you can check the return value of your function??

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 01 September 2004 - 09:57

I see there is a foreign key into the dialog table as part of the primary key for this particular table:
http://msdn.microsof...ntrol_table.asp

I would check that the table ID you are using matches an existing record in the dialog table.
Regards
-Stein Åsmul

frtr

frtr
  • Members
  • 10 posts

Posted 01 September 2004 - 14:59

I looked on the web site you supplied and I can see that the Dialog_ and Control column are both keys.

However, I have no idea how I can create an entry while respecting those 2 keys...

Can anyone help?

You can try using the WiRunSql.vbs script supplied in the windows installer sdk.

For examples :

SQL Queries examples

Thanks for your help.

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 01 September 2004 - 23:37

What this means is that the controls must be added to an existing dialog. So either create a new dialog and then link to it, or find the name / identifier in the dialog table of an existing dialog and use this identifier in your control table dialog column http://msdn.microsof...ialog_table.asp

Edited by Glytzhkof, 01 September 2004 - 23:40.

Regards
-Stein Åsmul