Question : Insert new controls into a form via SQL INSERT INTO

I wish to insert a checkbox control into a form via sql INSERT INTO. Iā€™m using MS Sql Server Management Studio 2008.

I know I need to use a sql statement something like below.

INSERT INTO [M1_TJ].[dbo].[FormDefinitions]
           ([xaoFormID]
           ,[xaoControlName]
           ,[xaoClassID]
           ,[xaoType]
           ,[xaoProperties]
           ,[xaoCode])
     VALUES
           (<xaoFormID, char(75),>
           ,<xaoControlName, char(70),>
           ,<xaoClassID, char(35),>
           ,<xaoType, numeric(1,0),>
           ,<xaoProperties, text,>
           ,<xaoCode, text,>)

I would like to insert the following values below into M1_TJ dataset

xaoFormID: PART-FSIP*
xaoControlName: CHKLINTPOT                                                            
xaoClassID: M1.M1CHECKBOX                      
xaoType: 2
xaoProperties: Top = 1640 Left = 877 Height = 44 Width = 96 DataSource = "M1DataControl" Caption = "Lint Pot"
xaoCode: Function CHKLINTPOT_Change() Call UpdateSummary()   End Function

*For xaoFormID above, I would like to insert all the other values into xaoFormID where xaoFormID like ā€˜%PART-FSIP%ā€™

My concern is the xaoCode field. When I go into design studio to edit the code, there are line breaks which adhere to VBscript coding conventions.

To check if your solution is getting proper results, I would like to first fun a Select and check the data and if it is ok, run the update or insert statement.

Thanks heaps! J

Answer : Insert new controls into a form via SQL INSERT INTO

Here a list of things to try :
-from Device manager scan for new hardware
-in device manager>view tab, click "show hidden devices" and delete all usb entries and hidden devices,  reboot and test
-then you can download the latest drivers for the chipset, and reinstall it to update the USB root hubs
-start>run>diskmgmt.msc      check if the usb devices show up in disk management, then run :   start>run>services.msc
In the listing look for removable storage service.
If it is set to Auto, and not started, then start it : click the Start link in the top left...
-In c:\windows\inf, look for usbstor.inf    -  If it is not there, you can copy it from another PC..When you find it, right click it and select Install
Random Solutions  
 
programming4us programming4us