Thanks for the reply. I have a webmethod server side: <WebMethod> _ Public Shared Function GetDataSet() As DataSet 'Get dataset here... Return ds End Function Client Side: function GetData() { PageMethods.GetDataSet(onSuccess, onFail); } function onSuccess(result) { alert(result.tables[0].rows[0].ColumnName); } function onFail(e) { alert(e.get_message()); } Stepping through, the webmethod runs without error but I get a Deserialization error alert from the onFail function. I have done what the AJAX.NET example I've seen here http://www.ajaxpro.info/Examples/DataSets/default.aspx[^] suggests but I get the above error. Is there something else I need to do, webconfig setting etc?
Stephen McGuire
Posts
-
Working with DataSet on client -
Working with DataSet on clientVS2008 Can anyone point me in the right direction for working with a DataSet in Javascript/AJAX.NET? I have seen examples that return a DataSet in a WebMethod and work with the tables and rows from the returned result but I get a 'circular reference while deserializing' error message... I want to be able to call a WebMethod asynchronously, return a DataSet and then populate and Infragistics WebGrid with the data. How do I get the data from the DataSet into the client script? Thanks for any help...
-
Hi by using access database and i am facing lot of problemsDo you have the 'Default Open Mode' set to 'shared' in the Database Options? Steve
-
To set an existing column to currencyAre you suing MS Access as a front-end to a SQL back-end database? If so, you can set the column type to 'Currency' in the table designer. Steve
-
Sending PDF to printerThis may help you out: http://www.codeproject.com/showcase/pdfrasterizer.asp[^] Steve
-
When you delete a table,its strututral definition,data,indexes,views,constraints are permanently deleted from a database?Yes, usually... In SQL Server, you can setup a 'View' in such a way that it prevents a participating table from being deleted...I think! Unless you store the schema of a table in some other way, the structural definition will be lost too. Steve
-
ListView! Please help! Urgent!I don't think you can add SubItems by index. However, you can retrieve SubItems by index. You will probably need to use an array to insert the value at the appropriate index and then rebuild the ListView using your array. Steve
-
how to enable only a single column of datagridSet the other columns to 'ReadOnly'. Steve
-
Problems in using single dataset in different VB FORMSYou are welcome. Upon reading my answer again, I actually got the values the wrong way round! You would normally have the DisplayMember = "Description" and the ValueMember = "ID". Steve
-
Problems in using single dataset in different VB FORMSOne should be DisplayMember (the column that you want displayed in your combo), the other should be ValueMember (the column that represents the data you want to store). For example, if you have a table with columns ID and Description, you could set your DisplayMember to 'ID' and your ValueMember to 'Description'. On your form, you will see the value in the Description displayed in your combo but you will actually store the corresponding ID when updating your DataSet. CobmoBox1.DisplayMember = "ID" CobmoBox1.ValueMember = "Description" Steve
-
Question abt self joined tablesI'm not an expert in this but since you've had no other replies, here is my opinion... Just create your form as if the underlying table didn't have a self join. It's purpose is to relate two fields in the same table and is really only to make data retrieval (queries, SP's etc) easier and more efficient. Steve
-
Merging Cells in Excel Using VB.NETCan you show an example of the code you are using to export data to excel? Steve
-
few queries in Stored proceduresMy post regarding the GO statement was correct, however, I omitted to mention that this relates to the Query Analyzer and not stored procedures (as Colin pointed out). I apologise if that omission rendered my post misleading. Steve
-
Control array problems! help plzWell, it will check all combo boxes but only return an error for one at a time. Presumably you call checkCbos() in your Save button 'click' procedure? The function will set an error provider on the first combo box that contains "" and then exit the function. If you select an item and then click your Save button again, you will be notified of any further combos containing "". This way, if you added another combo box at any time, the code will still work. The way you have done it is fine but would fail if you added another combo at any time. If it works for you though, that's great! Steve
-
Control array problems! help plzSomething like this:
Private Function checkCbos() As Boolean Dim myControl As Control For Each myControl In Me.Controls If TypeOf myControl Is ComboBox Then If myControl.Text = "" Then 'Set error provider errorPro.SetError(myControl, "Do not leave the factor box empty!") 'Return False and exit to calling procedure Return False Else 'Clear the error provider errorPro.SetError(myControl, "") End If End If Next myControl 'If code gets to here, no combo's text is "" Return True End Function
Steve -
Regarding CursorThere are many differences. Basically, Client-Side cursors work on a default result set that is cached on the client. They can be forward-only or static. Server-Side cursors have much more functionality, for example, Dynamic cursors reflect all changes made to the rows in their result set when scrolling through the cursor. Steve
-
few queries in Stored proceduresGO signifies that the current batch of Transact-SQL statements should be sent to SQL Server. The current batch of statements is composed of all statements entered since the last GO, or since the start of the ad hoc session or script if this is the first GO. GO must be on a line of its own but may include comments. Any number of sub-queries may be nested in a statement. Steve
-
Converting JET to SQL DatabaseI imagine most (if not all) of the SQL in the VB6 app will work just as well with no change on a MS SQL backend. Of course, you will need a new connection string. The OleDb adapters, readers etc should work with MS SQL too. Though you will probably want to change them to SQLAdapters etc. Some saved queries (Access/JET) will need to be converted to MS SQL stored procedures, functions etc. May want to look through the code for any Access/JET automation code that may be used to do things like show reports etc. Other than that, I'd be interested to know what you found myself! Steve
-
Editing a MS Access databaseI always do such edits in Access. I have never tried to alter table structures dynamically from VB. You may want to try posting your question in MDBMakers.com. This forum has Access MVP's and many knowledgeable users who may be able to help you. Steve
-
need some help with printing in VB.netThere are many ways to do what you ask... Are you using a database to store information? If so, it may have reporting features that you could use quite easily. Would you consider Office automation, e.g. Word, Excel? If so, you could simply create a Word template or Excel template and insert the data and print it from your code. This would require an installation of one of the above MS Office applications. You could use Crystal Reports (if you have it). Otherwise, you will need to work with Printer/Document objects, which could be quite difficult for someone new to VB. Steve