Click here to Skip to main content
15,914,111 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHow to fetch data from database in Tree view Pin
dj.rock27-Oct-06 17:49
dj.rock27-Oct-06 17:49 
AnswerRe: How to fetch data from database in Tree view Pin
Abhishek Joshi27-Oct-06 22:32
Abhishek Joshi27-Oct-06 22:32 
GeneralRe: How to fetch data from database in Tree view Pin
dj.rock29-Oct-06 17:02
dj.rock29-Oct-06 17:02 
Questionfile upload asp control Pin
dhatchu27-Oct-06 15:43
dhatchu27-Oct-06 15:43 
Questionuploading excel file to web server Pin
nivasinfotech27-Oct-06 12:03
nivasinfotech27-Oct-06 12:03 
AnswerRe: uploading excel file to web server Pin
Tad McClellan27-Oct-06 16:33
professionalTad McClellan27-Oct-06 16:33 
AnswerRe: uploading excel file to web server Pin
Jerry Hammond27-Oct-06 17:38
Jerry Hammond27-Oct-06 17:38 
QuestionUse 2 different databases Pin
shapper27-Oct-06 8:07
shapper27-Oct-06 8:07 
Hello,

I have created a function which creates a DataTable from a Database.

However, I want to be able to use an Access or aSQL database.

Do I need to create 2 complete different functions?

The method is the same, only the types change.

Here is my code:

' Define connection
Dim connection As New SqlClient.SqlConnection(connectionString.ToString)

' Define command
Dim command As New SqlClient.SqlCommand
With command
.CommandText = "GetRecords"
.Connection = connection
.CommandType = CommandType.StoredProcedure
End With

' Add command parameters
With command.Parameters
.Add(New SqlClient.SqlParameter("@Value", Value))
End With

connection.Open()
...
Create DataTable
...
connection.Close()

Thanks,

Miguel
AnswerRe: Use 2 different databases Pin
indianet27-Oct-06 13:04
indianet27-Oct-06 13:04 
AnswerRe: Use 2 different databases Pin
Jerry Hammond27-Oct-06 18:01
Jerry Hammond27-Oct-06 18:01 
Questionhey guys!!!!!!!! Pin
dhami_naresh27-Oct-06 7:22
dhami_naresh27-Oct-06 7:22 
AnswerRe: hey guys!!!!!!!! Pin
ednrgc27-Oct-06 7:27
ednrgc27-Oct-06 7:27 
QuestionCenter buttons, textboxes, and images Pin
kani9827-Oct-06 6:12
kani9827-Oct-06 6:12 
AnswerRe: Center buttons, textboxes, and images Pin
ednrgc27-Oct-06 7:31
ednrgc27-Oct-06 7:31 
AnswerRe: Center buttons, textboxes, and images Pin
indianet27-Oct-06 13:06
indianet27-Oct-06 13:06 
QuestionSetting asp.net Version number using installer projects Pin
Nick The Newbie27-Oct-06 5:58
Nick The Newbie27-Oct-06 5:58 
QuestionRe: Setting asp.net Version number using installer projects Pin
Nick The Newbie30-Oct-06 3:16
Nick The Newbie30-Oct-06 3:16 
QuestionImage Preview Pin
SiouxL27-Oct-06 5:58
SiouxL27-Oct-06 5:58 
QuestionXML, Runtime and Web.Config problem. How to solve this? Pin
shapper27-Oct-06 5:31
shapper27-Oct-06 5:31 
QuestionUnable to access IIS metabase? Pin
eggsovereasy27-Oct-06 4:43
eggsovereasy27-Oct-06 4:43 
QuestionAccessing images stored within a firewall?? Pin
Goalie3527-Oct-06 4:09
Goalie3527-Oct-06 4:09 
AnswerRe: Accessing images stored within a firewall?? Pin
Jim Conigliaro27-Oct-06 11:00
Jim Conigliaro27-Oct-06 11:00 
Questiondatagrid with checkboxes in C#.net(asp.net) Pin
vijay258327-Oct-06 3:44
vijay258327-Oct-06 3:44 
QuestionAbout Frames Pin
sribachana27-Oct-06 2:23
sribachana27-Oct-06 2:23 
AnswerRe: About Frames Pin
Tad McClellan27-Oct-06 16:37
professionalTad McClellan27-Oct-06 16:37 

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.