473,796 Members | 2,677 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem with .aspx.vb code

I'm working on a problem with a form with 6 textboxes and a submit
button for adding data to an Access database.I changed a few things
and got it down to 1 error!. I have a Sub
Page_Load and a Sub btnAdd:
(It still doesn't like the 'SourceVersion' in the Sub Page_Load).
Also
I viewed the .aspx in the browser and got an error which I posted
complete at the bottom of this post). Thanks for any clues... I'm
almost there!!

Imports System.Data
Imports System.Data.Ole Db
Public Class Default5
Inherits System.Web.UI.P age
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArg s) Handles MyBase.Load
Dim cnn As OleDbConnection = _
New OleDbConnection ("Data Source=(local); " & _
"Initial Catalog=Assets; Integrated Security=SSPI")
Dim ds As DataSet = New DataSet()
Dim da As OleDbDataAdapte r = New OleDbDataAdapte r()
If IsPostBack Then
Dim cmdSelect As OleDbCommand = _
cnn.CreateComma nd()
cmdSelect.Comma ndType = CommandType.Tex t
cmdSelect.Comma ndText = _
"SELECT (Asset Number, Description, Serial_Number, Mfg, Asset Type,
RDCnumber) FROM Assets"
Dim cmdInsert As OleDbCommand = _
cnn.CreateComma nd()
cmdInsert.Comma ndType = CommandType.Tex t
cmdInsert.Comma ndText = _
"INSERT INTO Assets " & _
"(Asset Number, Description, Serial_Number, Mfg, Asset Type,
RDCnumber) " & _
"VALUES(@Asset_ Number, @Description, @Serial_Number, @Mfg,
@AssetType,
@RDCnumber"
cmdInsert.Param eters.Add("@txt Asset_Number",
OleDbType.Doubl e, 12, "Asset_Numb er")
cmdInsert.Param eters.Add("@txt Description",
OleDbType.WChar , 40, "Descriptio n")
cmdInsert.Param eters.Add("@txt Serial_Number",
OleDbType.WChar , 30, "Serial_Number" )
cmdInsert.Param eters.Add("@txt Mfg", OleDbType.WChar , 30,
"Mfg")
cmdInsert.Param eters.Add("@txt AssetType",
OleDbType.WChar ,
30, "AssetType" )
cmdInsert.Param eters.Add("@txt RDCNumber",
OleDbType.WChar ,
30, "RDCnumber" )
Dim SourceVersion As DataRowVersion
SourceVersion = DataRowVersion. Original
da.SelectComman d = cmdSelect
da.InsertComman d = cmdInsert
da.Fill(ds, "Assets")
End If
End Sub
Private Sub btnAdd_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArg s) Handles btnAdd.Click
Dim ds As DataSet = New DataSet()
Dim da As OleDbDataAdapte r = New OleDbDataAdapte r()
Dim dr As DataRow = ds.Tables("Asse ts").NewRow()
dr(0) = txtAsset_Number .Text
dr(1) = txtDescription. Text
dr(2) = txtSerial_Numbe r.Text
dr(3) = txtMfg.Text
dr(4) = txtAssetType.Te xt
dr(5) = txtRDCnumber.Te xt
ds.Tables("Asse ts").Rows.Add(d r)
da.Update(ds, "Assets")
End Sub
End Class
_______________ ___________
Server Error in '/' Application.
---------------------------------------------------------------------------*-----
An OLE DB Provider was not specified in the ConnectionStrin g. An
example would be, 'Provider=SQLOL EDB;'.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.Argument Exception: An OLE DB Provider was
not specified in the ConnectionStrin g. An example would be,
'Provider=SQLOL EDB;'.
Source Error:
Line 5: Private Sub Page_Load(ByVal sender As System.Object, _
Line 6: ByVal e As System.EventArg s) Handles MyBase.Load
Line 7: Dim cnn As OleDbConnection = _
Line 8: New OleDbConnection ("Data Source=(local); " & _
Line 9: "Initial Catalog=Assets; Integrated Security=SSPI")
Source File: E:\kunden\homep ages\26\d190091 667\Default5.as px.vb
Line: 7
Stack Trace:
[ArgumentExcepti on: An OLE DB Provider was not specified in the
ConnectionStrin g. An example would be, 'Provider=SQLOL EDB;'.]
System.Data.Ole Db.OleDbConnect ionString.Valid ateProvider(Str ing
progid) +1044303
System.Data.Ole Db.OleDbConnect ionString.Valid ateConnectionSt ring(String
connectionStrin g) +221
System.Data.Ole Db.OleDbConnect ionString..ctor (String
connectionStrin g, Boolean validate) +271
System.Data.Ole Db.OleDbConnect ionFactory.Crea teConnectionOpt ions(String
connectionStrin g, DbConnectionOpt ions previous) +36
System.Data.Pro viderBase.DbCon nectionFactory. GetConnectionPo olGroup(String
connectionStrin g, DbConnectionPoo lGroupOptions poolOptions,
DbConnectionOpt ions& userConnectionO ptions) +125
System.Data.Ole Db.OleDbConnect ion.ConnectionS tring_Set(Strin g
value) +56
System.Data.Ole Db.OleDbConnect ion.set_Connect ionString(Strin g
value) +4
System.Data.Ole Db.OleDbConnect ion..ctor(Strin g connectionStrin g)
+21
Default5.Page_L oad(Object sender, EventArgs e) in E:\kunden
\homepages\26\d 190091667\Defau lt5.aspx.vb:7
System.Web.UI.C ontrol.OnLoad(E ventArgs e) +99
System.Web.UI.C ontrol.LoadRecu rsive() +47
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint)
+1061

Aug 8 '07 #1
13 1630
<snip>
>
Imports System.Data
Imports System.Data.Ole Db
Public Class Default5
Inherits System.Web.UI.P age
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArg s) Handles MyBase.Load
Dim cnn As OleDbConnection = _
New OleDbConnection ("Data Source=(local); " & _
"Initial Catalog=Assets; Integrated Security=SSPI")
Dim ds As DataSet = New DataSet()
</snip>
Try

Dim cnn As OleDbConnection = New
OleDbConnection ("Provider=Micr osoft.Jet.OLEDB .4.0;Data Source=(local);
Initial Catalog=Assets; Integrated Security=SSPI")

But this still wont work, because as far as I can see, you dont set the
path to the access file anywhere.
Aug 8 '07 #2
The database resides in the App_Data folder on my web provider's
server where my website objects reside. Do I need to put the path to
the URL? Thanks!
>
But this still wont work, because as far as I can see, you dont set the
path to the access file anywhere.

Aug 8 '07 #3
I changed the filepath and was able to get it to have no errors. But
when I ran my .aspx file I got the following error shown below my
code. Is the line "If IsPostBack" an issue? Thanks

Imports System.Data
Imports System.Data.Ole Db
Public Class Default5
Inherits System.Web.UI.P age
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArg s) Handles MyBase.Load
Dim cnn As OleDbConnection = _
New OleDbConnection ("Provider=Micr osoft.Jet.OLEDB .4.0;Data
Source=(www.jug gernautical.com \App_Data\Lowes .mdb);" & _
"Initial Catalog=Assets; Integrated Security=SSPI")
Dim ds As DataSet = New DataSet()
Dim da As OleDbDataAdapte r = New OleDbDataAdapte r()
If IsPostBack Then
Dim cmdSelect As OleDbCommand = _
cnn.CreateComma nd()
cmdSelect.Comma ndType = CommandType.Tex t
cmdSelect.Comma ndText = _
"SELECT (Asset Number, Description, Serial_Number, Mfg, Asset Type,
RDCnumber) FROM Assets"
Dim cmdInsert As OleDbCommand = _
cnn.CreateComma nd()
cmdInsert.Comma ndType = CommandType.Tex t
cmdInsert.Comma ndText = _
"INSERT INTO Assets " & _
"(Asset Number, Description, Serial_Number, Mfg, Asset Type,
RDCnumber) " & _
"VALUES(@Asset_ Number, @Description, @Serial_Number, @Mfg, @AssetType,
@RDCnumber"
cmdInsert.Param eters.Add("@txt Asset_Number",
OleDbType.Doubl e, 12, "Asset_Numb er")
cmdInsert.Param eters.Add("@txt Description",
OleDbType.WChar , 40, "Descriptio n")
cmdInsert.Param eters.Add("@txt Serial_Number",
OleDbType.WChar , 30, "Serial_Number" )
cmdInsert.Param eters.Add("@txt Mfg", OleDbType.WChar , 30,
"Mfg")
cmdInsert.Param eters.Add("@txt AssetType", OleDbType.WChar ,
30, "AssetType" )
cmdInsert.Param eters.Add("@txt RDCNumber", OleDbType.WChar ,
30, "RDCnumber" )
Dim SourceVersion As DataRowVersion
SourceVersion = DataRowVersion. Original
da.SelectComman d = cmdSelect
da.InsertComman d = cmdInsert
da.Fill(ds, "Assets")
End If
End Sub
Private Sub btnAdd_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArg s) Handles btnAdd.Click
Dim ds As DataSet = New DataSet()
Dim da As OleDbDataAdapte r = New OleDbDataAdapte r()
Dim dr As DataRow = ds.Tables("Asse ts").NewRow()
dr(0) = txtAsset_Number .Text
dr(1) = txtDescription. Text
dr(2) = txtSerial_Numbe r.Text
dr(3) = txtMfg.Text
dr(4) = txtAssetType.Te xt
dr(5) = txtRDCnumber.Te xt
ds.Tables("Asse ts").Rows.Add(d r)
da.Update(ds, "Assets")
End Sub
End Class
_______________ _______________ _______________ _______________ ___
Server Error in '/' Application.
--------------------------------------------------------------------------------

Multiple-step OLE DB operation generated errors. Check each OLE DB
status value, if available. No work was done.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Data.Ole Db.OleDbExcepti on: Multiple-step OLE
DB operation generated errors. Check each OLE DB status value, if
available. No work was done.

Source Error:

Line 33: da.SelectComman d = cmdSelect
Line 34: da.InsertComman d = cmdInsert
Line 35: da.Fill(ds, "Assets")
Line 36: End If
Line 37: End Sub

Source File: E:\kunden\homep ages\26\d190091 667\Default5.as px.vb
Line: 35

Stack Trace:

[OleDbException (0x80040e21): Multiple-step OLE DB operation generated
errors. Check each OLE DB status value, if available. No work was
done.]

System.Data.Ole Db.OleDbService sWrapper.GetDat aSource(OleDbCo nnectionString
constr, DataSourceWrapp er& datasrcWrapper) +209

System.Data.Ole Db.OleDbConnect ionInternal..ct or(OleDbConnect ionString
constr, OleDbConnection connection) +118

System.Data.Ole Db.OleDbConnect ionFactory.Crea teConnection(Db ConnectionOptio ns
options, Object poolGroupProvid erInfo, DbConnectionPoo l pool,
DbConnection owningObject) +53

System.Data.Pro viderBase.DbCon nectionFactory. CreateNonPooled Connection(DbCo nnection
owningConnectio n, DbConnectionPoo lGroup poolGroup) +27

System.Data.Pro viderBase.DbCon nectionFactory. GetConnection(D bConnection
owningConnectio n) +47

System.Data.Pro viderBase.DbCon nectionClosed.O penConnection(D bConnection
outerConnection , DbConnectionFac tory connectionFacto ry) +105
System.Data.Ole Db.OleDbConnect ion.Open() +37
System.Data.Com mon.DbDataAdapt er.FillInternal (DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
srcTable, IDbCommand command, CommandBehavior behavior) +121
System.Data.Com mon.DbDataAdapt er.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +137
System.Data.Com mon.DbDataAdapt er.Fill(DataSet dataSet, String
srcTable) +83
Default5.Page_L oad(Object sender, EventArgs e) in E:\kunden
\homepages\26\d 190091667\Defau lt5.aspx.vb:35
System.Web.UI.C ontrol.OnLoad(E ventArgs e) +99
System.Web.UI.C ontrol.LoadRecu rsive() +47
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint)
+1061
_______________ _______________ _

On Aug 8, 6:09 am, Mick Walker <materiali...@p rivacy.netwrote :
<snip>
Imports System.Data
Imports System.Data.Ole Db
Public Class Default5
Inherits System.Web.UI.P age
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArg s) Handles MyBase.Load
Dim cnn As OleDbConnection = _
New OleDbConnection ("Data Source=(local); " & _
"Initial Catalog=Assets; Integrated Security=SSPI")
Dim ds As DataSet = New DataSet()

</snip>
Try

Dim cnn As OleDbConnection = New
OleDbConnection ("Provider=Micr osoft.Jet.OLEDB .4.0;Data Source=(local);
Initial Catalog=Assets; Integrated Security=SSPI")

But this still wont work, because as far as I can see, you dont set the
path to the access file anywhere.

Aug 8 '07 #4
slinky wrote:
I changed the filepath and was able to get it to have no errors. But
when I ran my .aspx file I got the following error shown below my
code. Is the line "If IsPostBack" an issue? Thanks
>
Use Server.MapPath or try the reletive path to the data file.
Aug 8 '07 #5
I've used Server.MapPath with reading an XML file into a dataset, but
am unsure how to phrase it for an Access Database. What I used for XML
was:

Using ds As New DataSet()
ds.ReadXml(Serv er.MapPath("blo g.xml"))

So I'm unsure where to go from here. Here's what I'm coming up with
for the Connection for Page_Load:

New OleDbConnection ("Provider=Micr osoft.Jet.OLEDB .4.0;Data
Source=(Server. MapPath\App_Dat a\Lowes.mdb);" & _
"Initial Catalog=Assets; Integrated Security=SSPI")

But do I need to do anything in the code for btnADD ?

Private Sub btnAdd_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArg s) Handles btnAdd.Click
Dim ds As DataSet = New DataSet()
Dim da As OleDbDataAdapte r = New OleDbDataAdapte r()
Dim dr As DataRow = ds.Tables("Asse ts").NewRow()
dr(0) = txtAsset_Number .Text
dr(1) = txtDescription. Text
dr(2) = txtSerial_Numbe r.Text
dr(3) = txtMfg.Text
dr(4) = txtAssetType.Te xt
dr(5) = txtRDCnumber.Te xt
ds.Tables("Asse ts").Rows.Add(d r)
da.Update(ds, "Assets")
End Sub

I get no errors till I view in browser:
Source Error:

Line 33: da.SelectComman d = cmdSelect
Line 34: da.InsertComman d = cmdInsert
Line 35: da.Fill(ds, "Assets")
Line 36: End If
Line 37: End Sub

Line 35 is flagged in the browser as a problem.

On Aug 8, 9:43 am, Mick Walker <materiali...@p rivacy.netwrote :
slinky wrote:
I changed the filepath and was able to get it to have no errors. But
when I ran my .aspx file I got the following error shown below my
code. Is the line "If IsPostBack" an issue? Thanks

Use Server.MapPath or try the reletive path to the data file.

Aug 8 '07 #6
slinky wrote:
I've used Server.MapPath with reading an XML file into a dataset, but
am unsure how to phrase it for an Access Database. What I used for XML
was:

Using ds As New DataSet()
ds.ReadXml(Serv er.MapPath("blo g.xml"))

So I'm unsure where to go from here. Here's what I'm coming up with
for the Connection for Page_Load:

New OleDbConnection ("Provider=Micr osoft.Jet.OLEDB .4.0;Data
Source=(Server. MapPath\App_Dat a\Lowes.mdb);" & _
"Initial Catalog=Assets; Integrated Security=SSPI")
Server.MapPath is a method, not a folder. It turns a virtual path into a
physical path, so you supply it with a virtual path. A virtual path uses
/, not \.

Use this to get the physical path to the database file:

Server.MapPath( "~/App_Data/Lowes.mdb")

Concatenate this into the connection string.
But do I need to do anything in the code for btnADD ?

Private Sub btnAdd_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArg s) Handles btnAdd.Click
Dim ds As DataSet = New DataSet()
Dim da As OleDbDataAdapte r = New OleDbDataAdapte r()
Dim dr As DataRow = ds.Tables("Asse ts").NewRow()
dr(0) = txtAsset_Number .Text
dr(1) = txtDescription. Text
dr(2) = txtSerial_Numbe r.Text
dr(3) = txtMfg.Text
dr(4) = txtAssetType.Te xt
dr(5) = txtRDCnumber.Te xt
ds.Tables("Asse ts").Rows.Add(d r)
da.Update(ds, "Assets")
End Sub
You need to supply a database connection to the DataAdapter, otherwise
it doesn't know what to update.
I get no errors till I view in browser:
Source Error:

Line 33: da.SelectComman d = cmdSelect
Line 34: da.InsertComman d = cmdInsert
Line 35: da.Fill(ds, "Assets")
Line 36: End If
Line 37: End Sub

Line 35 is flagged in the browser as a problem.
What "problem"? You should include the error message.

--
Göran Andersson
_____
http://www.guffa.com
Aug 8 '07 #7
I put this into my doce for the Page_Load and the btnAdd:

Dim cnn As OleDbConnection = _
New OleDbConnection ("Provider=Micr osoft.Jet.OLEDB .4.0;Data
Source=Server.M apPath(~/App_Data/Lowes.mdb));" & _
"Initial Catalog=Assets; Integrated Security=SSPI")

I get no errors till I launch the browser and here's the complete
message.
I see below what I believe to be the physical path on my provider's
server:

E:\kunden\homep ages\26\d190091 667\Default5.as px.vb

The actual URL to access my site to the page 'Default5.aspx (not the
module) is:
www.juggernautical.com/default5.aspx

_______________ _______________ _______________ _______________ _______________ _______________ ____

Server Error in '/' Application.
--------------------------------------------------------------------------------

Multiple-step OLE DB operation generated errors. Check each OLE DB
status value, if available. No work was done.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Data.Ole Db.OleDbExcepti on: Multiple-step OLE
DB operation generated errors. Check each OLE DB status value, if
available. No work was done.

Source Error:

Line 33: da.SelectComman d = cmdSelect
Line 34: da.InsertComman d = cmdInsert
Line 35: da.Fill(ds, "Assets") <<< This line
is in Red on screen
Line 36: End If
Line 37: End Sub

Source File: E:\kunden\homep ages\26\d190091 667\Default5.as px.vb
Line: 35

Stack Trace:

[OleDbException (0x80040e21): Multiple-step OLE DB operation generated
errors. Check each OLE DB status value, if available. No work was
done.]

System.Data.Ole Db.OleDbService sWrapper.GetDat aSource(OleDbCo nnectionString
constr, DataSourceWrapp er& datasrcWrapper) +209

System.Data.Ole Db.OleDbConnect ionInternal..ct or(OleDbConnect ionString
constr, OleDbConnection connection) +118

System.Data.Ole Db.OleDbConnect ionFactory.Crea teConnection(Db ConnectionOptio ns
options, Object poolGroupProvid erInfo, DbConnectionPoo l pool,
DbConnection owningObject) +53

System.Data.Pro viderBase.DbCon nectionFactory. CreateNonPooled Connection(DbCo nnection
owningConnectio n, DbConnectionPoo lGroup poolGroup) +27

System.Data.Pro viderBase.DbCon nectionFactory. GetConnection(D bConnection
owningConnectio n) +47

System.Data.Pro viderBase.DbCon nectionClosed.O penConnection(D bConnection
outerConnection , DbConnectionFac tory connectionFacto ry) +105
System.Data.Ole Db.OleDbConnect ion.Open() +37
System.Data.Com mon.DbDataAdapt er.FillInternal (DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
srcTable, IDbCommand command, CommandBehavior behavior) +121
System.Data.Com mon.DbDataAdapt er.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +137
System.Data.Com mon.DbDataAdapt er.Fill(DataSet dataSet, String
srcTable) +83
Default5.Page_L oad(Object sender, EventArgs e) in E:\kunden
\homepages\26\d 190091667\Defau lt5.aspx.vb:35
System.Web.UI.C ontrol.OnLoad(E ventArgs e) +99
System.Web.UI.C ontrol.LoadRecu rsive() +47
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint)
+1061


>
What "problem"? You should include the error message.

--
Göran Andersson
_____http://www.guffa.com- Hide quoted text -

- Show quoted text -

Aug 8 '07 #8
slinky wrote:
I put this into my doce for the Page_Load and the btnAdd:

Dim cnn As OleDbConnection = _
New OleDbConnection ("Provider=Micr osoft.Jet.OLEDB .4.0;Data
Source=Server.M apPath(~/App_Data/Lowes.mdb));" & _
"Initial Catalog=Assets; Integrated Security=SSPI")

I get no errors till I launch the browser and here's the complete
message.
I see below what I believe to be the physical path on my provider's
server:

E:\kunden\homep ages\26\d190091 667\Default5.as px.vb

The actual URL to access my site to the page 'Default5.aspx (not the
module) is:
www.juggernautical.com/default5.aspx

_______________ _______________ _______________ _______________ _______________ _______________ ____

Server Error in '/' Application.
--------------------------------------------------------------------------------

Multiple-step OLE DB operation generated errors. Check each OLE DB
status value, if available. No work was done.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Your select query is incorrect. If you have spaces in your field names,
you have to encode the names in brackets.

"SELECT ([Asset Number], Description, Serial_Number, Mfg, [Asset Type],
RDCnumber) FROM Assets"

--
Göran Andersson
_____
http://www.guffa.com
Aug 8 '07 #9
OK I double checked and corrected any incident of misspelling or
brackets missing and corrected those. But still the browser brings up
this: (And I know nothing about
reading a stack)

Also, do I have this syntaxed correctly (ignore the '& _'s as they are
just from reformat on paste)?:

New OleDbConnection ("Provider=Micr osoft.Jet.OLEDB .4.0;Data
Source=Server.M apPath(~/App_Data/Lowes.mdb));" & _
"Initial Catalog=Assets; Integrated Security=SSPI")
_______________ _______________ _______________ ______
Server Error in '/' Application.
--------------------------------------------------------------------------------

Multiple-step OLE DB operation generated errors. Check each OLE DB
status value, if available. No work was done.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Data.Ole Db.OleDbExcepti on: Multiple-step OLE
DB operation generated errors. Check each OLE DB status value, if
available. No work was done.

Source Error:
Line 33: da.SelectComman d = cmdSelect
Line 34: da.InsertComman d = cmdInsert
Line 35: da.Fill(ds, "Assets")
Line 36: End If
Line 37: End Sub
Source File: E:\kunden\homep ages\26\d190091 667\Default5.as px.vb
Line: 35

Stack Trace:
[OleDbException (0x80040e21): Multiple-step OLE DB operation generated
errors. Check each OLE DB status value, if available. No work was
done.]

System.Data.Ole Db.OleDbService sWrapper.GetDat aSource(OleDbCo nnectionString
constr, DataSourceWrapp er& datasrcWrapper) +209

System.Data.Ole Db.OleDbConnect ionInternal..ct or(OleDbConnect ionString
constr, OleDbConnection connection) +118

System.Data.Ole Db.OleDbConnect ionFactory.Crea teConnection(Db ConnectionOptio ns
options, Object poolGroupProvid erInfo, DbConnectionPoo l pool,
DbConnection owningObject) +53

System.Data.Pro viderBase.DbCon nectionFactory. CreateNonPooled Connection(DbCo nnection
owningConnectio n, DbConnectionPoo lGroup poolGroup) +27

System.Data.Pro viderBase.DbCon nectionFactory. GetConnection(D bConnection
owningConnectio n) +47

System.Data.Pro viderBase.DbCon nectionClosed.O penConnection(D bConnection
outerConnection , DbConnectionFac tory connectionFacto ry) +105
System.Data.Ole Db.OleDbConnect ion.Open() +37
System.Data.Com mon.DbDataAdapt er.FillInternal (DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String
srcTable, IDbCommand command, CommandBehavior behavior) +121
System.Data.Com mon.DbDataAdapt er.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +137
System.Data.Com mon.DbDataAdapt er.Fill(DataSet dataSet, String
srcTable) +83
Default5.Page_L oad(Object sender, EventArgs e) in E:\kunden
\homepages\26\d 190091667\Defau lt5.aspx.vb:35
System.Web.UI.C ontrol.OnLoad(E ventArgs e) +99
System.Web.UI.C ontrol.LoadRecu rsive() +47
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint)
+1061
>
Your select query is incorrect. If you have spaces in your field names,
you have to encode the names in brackets.

"SELECT ([Asset Number], Description, Serial_Number, Mfg, [Asset Type],
RDCnumber) FROM Assets"

--
Göran Andersson
_____http://www.guffa.com- Hide quoted text -

- Show quoted text -

Aug 8 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2803
by: sathya | last post by:
hi, i have problem in httphandler, my problem is that when i am trying to use server.execute(/default.aspx) i am getting error.... Here i am trying to redirect from home.aspx to default.aspx (both file isin sharepoint).I have give a copy of my code below..
5
3049
by: | last post by:
Hi, I'm trying to use the cookie munging session handling behaviour of asp.net instead of cookies themselves as I'm finding quite a few people are barring cookies (especially AOL users). If I change the setting in web.config everything seems to work fine as long as I'm using relative paths. The problem is I've got a menuing system that's generated from a site-wide template - so I use a fixed path from the application root - (ie:...
6
2734
by: Shamin | last post by:
Hi, Thanks in advance for answering to my Question. I'm stuck with this problem and would really appreciate any help. I have 2 aspx files (Main.aspx and ReportViewer.aspx). Main.aspx has a datagrid which is populated with list of report names. When the user click on the name of a report, I display a panel that has a button which on clicking will run the report. The report will open in ReportViewer.aspx, This page has a Report Document...
6
3815
by: Ammar | last post by:
Dear All, I'm facing a small problem. I have a portal web site, that contains articles, for each article, the end user can send a comment about the article. The problem is: I the comment length is more that 1249 bytes, then the progress bar of the browser will move too slow and then displaying that the page not found!!!! If the message is less than or equal to 1249 then no problem.
7
5231
by: Ankit Aneja | last post by:
I put the code for url rewrite in my Application_BeginRequest on global.ascx some .aspx pages are in root ,some in folder named admin and some in folder named user aspx pages which are in user folder are using this code of url rewrite project is running completely fine on localhost but after uploading first page (http://emailware.net.temporary.domain.name/user/index.aspx) is fine but as i click 123 Easy-CD Ripper
2
2510
by: MS News Public | last post by:
Hi I have an asp.net 2.0 project and am experiencing a problem. In the project, I am trying to make use of Membership. I have one Role, called "Basic User" and two users - "admin" and "test". "admin" is a member of the Role but "test" is not.
0
2120
by: james.mcdonagh | last post by:
Hi I am a newbie using nAnt for .net 2.0. As such I have not come across this bug before, and I would be happy of any help that you may be able to provide. In order to help I have included the nant file which is causing the problem, the object code that is not being built and the error message which is being produced. The weird thing is that VS.net builds without a problem. And the intellisense within the object WorkQueue knows that...
1
6181
by: jamesmcdonagh | last post by:
Hi newbie using nAnt for .net 2.0. I would be happy of any help that you may be able to provide. The weird thing is that VS.net builds without a problem. And the intellisense within the object WorkQueue knows that Master is referring to the PanelManager reference. nant file ------------------------------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="utf-8"?>...
4
2648
by: Goran Djuranovic | last post by:
Hi all, I am experiencing a strange thing happening with a "designer.vb" page. Controls I manually declare in this page are automatically deleted after I drop another control on a ".aspx" page. - Why is this happening? - Can I disable automatic declaration and have everything be declared manually? - Any other options to fix this? Thanks in advance. Goran Djuranovic
0
1375
by: Syoam4ka | last post by:
My project is about jewellery. I have devided my jewelery into main types, which each one of them has sub types, and each one those sub types has the jewellery. I have a tabcontainer. It includes tabpanels such as:Catalog,Terms,SiteMap.ViewCart ,etc. All the jewellery Intro is in the Catalog panel. when I first click the Catalog panel it Introduces me all the main types of the jewellery(It's all done dynamically from the cs file).The...
0
9684
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9530
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10459
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10182
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10017
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6793
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5445
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.