Click here to Skip to main content
15,910,303 members
Home / Discussions / Database
   

Database

 
GeneralRe: Visio - Reverse Engineering > Code Generation Pin
devvvy28-Mar-06 12:25
devvvy28-Mar-06 12:25 
GeneralRe: Visio - Reverse Engineering > Code Generation Pin
Steve Maier28-Mar-06 15:42
professionalSteve Maier28-Mar-06 15:42 
GeneralRe: Visio - Reverse Engineering > Code Generation Pin
devvvy29-Mar-06 4:37
devvvy29-Mar-06 4:37 
QuestionCan i use view Pin
papa198027-Mar-06 22:57
papa198027-Mar-06 22:57 
QuestionCreating a new user in SQL Server 2005 Pin
Brendan Vogt27-Mar-06 22:33
Brendan Vogt27-Mar-06 22:33 
Questiondaab transaction Pin
silverP27-Mar-06 22:08
silverP27-Mar-06 22:08 
QuestionHow to restore Backup file from remote PC to SQL Server? Pin
Sachin Gedam27-Mar-06 17:35
Sachin Gedam27-Mar-06 17:35 
Questionquery send between .net and ms access Pin
agentmikie27-Mar-06 13:03
agentmikie27-Mar-06 13:03 
Hi.

I am trying to get a bit clearer understanding on what goes on between .net 1.1 and databases, in particular ms sql 2k and ms access.

Initially I could not quite figure out how @name in Execute1(string name) was handled by ms sql and .net because it looked to me like a undeclared variable in sql.

If I use SqlParameters against ms sql 2k, it seems that what actually happens is that .net executes the stored procedure sp_executesql on ms sql 2k.

Example (using NorthWind db on ms sql 2k in C#):
<br />
public void Execute1(string name){<br />
   ...<br />
   command.CommandText="Select CategoryID from Categories where CategoryName like @name";	<br />
   SqlParameter param=new SqlParameter     ("@name",System.Data.SqlDbType.NVarChar,15);<br />
   param.Value=name;<br />
   command.Parameters.Add(param);<br />
   ...}<br />

is equal to (in regards to what ms sql recieves) :
<br />
public void Execute2(string name){<br />
   ...<br />
   command.CommandText="exec sp_executesql N'Select CategoryID from Categories where CategoryName like @name', N'@name nvarchar(15)', @name = N'" + name +"'";<br />
   ...}<br />


My question is then..
Since sp_executesql do not exsist in ms access, what does the tsql look like, when using SqlParameters in a query against a ms access database ?
Is there a tool that lets me peek into what goes on between .net and ms access?
Something like ms profiler for access databases ?

Thanks
Michael Weber.
QuestionHow to get Windows NT Logged User Name using Query Analyzer ****** URGENT Pin
GV Ramana27-Mar-06 8:51
GV Ramana27-Mar-06 8:51 
AnswerRe: How to get Windows NT Logged User Name using Query Analyzer ****** URGENT Pin
Eric Dahlvang29-Mar-06 8:50
Eric Dahlvang29-Mar-06 8:50 
Questionline1 : Incorrect syntax near ','. Pin
Amit R27-Mar-06 5:38
Amit R27-Mar-06 5:38 
AnswerRe: line1 : Incorrect syntax near ','. Pin
rccnh27-Mar-06 9:30
rccnh27-Mar-06 9:30 
AnswerRe: line1 : Incorrect syntax near ','. Pin
rccnh27-Mar-06 9:33
rccnh27-Mar-06 9:33 
GeneralRe: line1 : Incorrect syntax near ','. Pin
Amit R27-Mar-06 14:11
Amit R27-Mar-06 14:11 
AnswerRe: line1 : Incorrect syntax near ','. Pin
Rob Graham27-Mar-06 16:01
Rob Graham27-Mar-06 16:01 
AnswerRe: line1 : Incorrect syntax near ','. Pin
Amit R29-Mar-06 3:37
Amit R29-Mar-06 3:37 
QuestionT-SQL Help Pin
WDI27-Mar-06 2:51
WDI27-Mar-06 2:51 
AnswerRe: T-SQL Help Pin
Michael Potter27-Mar-06 2:58
Michael Potter27-Mar-06 2:58 
QuestionInvalid cast in using SQLDataReader Pin
Brendan Vogt27-Mar-06 2:35
Brendan Vogt27-Mar-06 2:35 
QuestionSQL login problem Pin
acroitoriu26-Mar-06 23:37
acroitoriu26-Mar-06 23:37 
AnswerRe: SQL login problem Pin
Brendan Vogt27-Mar-06 2:20
Brendan Vogt27-Mar-06 2:20 
QuestionCrystal Report, cannot find keycodev2.dll Pin
illusionFinder26-Mar-06 19:29
illusionFinder26-Mar-06 19:29 
AnswerRe: Crystal Report, cannot find keycodev2.dll Pin
nguyenvhn26-Mar-06 20:32
nguyenvhn26-Mar-06 20:32 
GeneralRe: Crystal Report, cannot find keycodev2.dll Pin
illusionFinder26-Mar-06 23:57
illusionFinder26-Mar-06 23:57 
Questioncolumn alter problm Pin
Vipin.d26-Mar-06 17:06
Vipin.d26-Mar-06 17:06 

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.