Click here to Skip to main content
16,012,843 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionDatabase connection wizard in .NET Pin
lildiapaz25-Jun-07 15:51
lildiapaz25-Jun-07 15:51 
QuestionURL Redirecting (or Rewriting?) Pin
achimera25-Jun-07 11:02
achimera25-Jun-07 11:02 
AnswerRe: URL Redirecting (or Rewriting?) Pin
Dan_P25-Jun-07 16:35
Dan_P25-Jun-07 16:35 
GeneralRe: URL Redirecting (or Rewriting?) Pin
achimera27-Jul-07 13:16
achimera27-Jul-07 13:16 
QuestionUpgraded from VS 2003 to VS 2005 then few of the strongly type (.xsd) datasets throws exceptions. Please look into it. Pin
Slow Learner25-Jun-07 8:54
Slow Learner25-Jun-07 8:54 
QuestionSilverlight - First Impression Pin
martin_hughes25-Jun-07 8:54
martin_hughes25-Jun-07 8:54 
AnswerRe: Silverlight - First Impression Pin
Urs Enzler26-Jun-07 4:01
Urs Enzler26-Jun-07 4:01 
QuestionStored procedure to a data table? Pin
boyindie25-Jun-07 8:38
boyindie25-Jun-07 8:38 
Hi
I am tryin to build a web front end which will speak to a mysql database in the background

I have decided to help with performance and maintainibility i am going to try and use stored procedures to extract data from database so i don't need to put all the sql through the script.

I am not sure if i am going in the right direction with this as i am a newbie at this game. I have produced the following function which i believe is correct.



Private Function spTest() As DataSet


Dim connectionString As String

'create connection to databases passes strings into mySql login
connectionString = _
"server=localhost; uid=*****; pwd=*******; " + _
"database=test"
'Sql command string, can enter stored procedure call here

Dim connection As New MySql.Data.MySqlClient.MySqlConnection(connectionString)
connection.Open()

Dim command As New MySql.Data.MySqlClient.MySqlCommand
command.Connection = connection
command.CommandText = "test"
command.CommandType = CommandType.StoredProcedure

Dim daAdaptor As New MySqlDataAdapter
daAdaptor.SelectCommand = command

daAdaptor.TableMappings.Add("id", "firstname")

Dim dataset As New DataSet
Dim table As DataTable = New DataTable
daAdaptor.Fill(dataset)
Return dataset


End Function

my stored procedure is just a simple select statement which extracts the id and name fields in my database

i want to be able to display my results in a datatable in the web browser.

has anyone get any hints in where i should go from here?

I am guessin i now need to build the page_load method and get it to call this function and pass the dataset variable into a table display method?

any help appreciated

boyindie
AnswerRe: Stored procedure to a data table? Pin
Not Active25-Jun-07 9:26
mentorNot Active25-Jun-07 9:26 
GeneralRe: Stored procedure to a data table? Pin
boyindie25-Jun-07 12:14
boyindie25-Jun-07 12:14 
GeneralRe: Stored procedure to a data table? Pin
Not Active25-Jun-07 13:33
mentorNot Active25-Jun-07 13:33 
GeneralRe: Stored procedure to a data table? Pin
boyindie25-Jun-07 13:35
boyindie25-Jun-07 13:35 
QuestionAssign data value in GridView Template Pin
Hampden Tech25-Jun-07 8:25
Hampden Tech25-Jun-07 8:25 
AnswerRe: Assign data value in GridView Template Pin
MartyExodus25-Jun-07 8:44
MartyExodus25-Jun-07 8:44 
GeneralRe: Assign data value in GridView Template Pin
Hampden Tech25-Jun-07 8:48
Hampden Tech25-Jun-07 8:48 
GeneralRe: Assign data value in GridView Template Pin
Not Active25-Jun-07 9:24
mentorNot Active25-Jun-07 9:24 
QuestionLost HttpContext Pin
Fausto Lopez25-Jun-07 7:29
Fausto Lopez25-Jun-07 7:29 
QuestionButton Field in Grid view Pin
seemamltn25-Jun-07 7:07
seemamltn25-Jun-07 7:07 
AnswerRe: Button Field in Grid view Pin
gauthee25-Jun-07 18:36
gauthee25-Jun-07 18:36 
AnswerRe: Button Field in Grid view Pin
PrakashBhaskar25-Jun-07 18:40
PrakashBhaskar25-Jun-07 18:40 
QuestionResize Image in TreeView Pin
MartyExodus25-Jun-07 5:56
MartyExodus25-Jun-07 5:56 
QuestionConnectivity Issue Pin
Nikhil Bandekar25-Jun-07 5:54
Nikhil Bandekar25-Jun-07 5:54 
AnswerRe: Connectivity Issue Pin
Venkatesh Mookkan25-Jun-07 18:54
Venkatesh Mookkan25-Jun-07 18:54 
Questionopening a file n reading it Pin
ahsan201125-Jun-07 5:34
ahsan201125-Jun-07 5:34 
GeneralRe: opening a file n reading it Pin
Guffa25-Jun-07 5:39
Guffa25-Jun-07 5:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.