|
Thanks for taking the time to answer my query.
I am using MS-Access not sql.
|
|
|
|
|
The best thing to do is create a stored procedure that creates the table you need. Then from your code you can execute that stored procedure and have the table created. The caution I stress is that it should be a one time deal unless you do a check to see if the table currents exists or your perform a drop table first in the SP.
|
|
|
|
|
I have used this driver instead of Jet 3.51
DRIVER={Microsoft Access Driver (*.mdb)};DBQ=
and it is working now (My boss says it's alright to use
this driver in our project)
Thanks Scott and KaptinKrunch for ur help.
-- modified at 7:11 Tuesday 6th December, 2005
|
|
|
|
|
I am a newbie so any help is appreciated. I wrote a program in VB.net (Visual Studio 2003)that uses the Internet explorer control. It needs to be fully automated for a lobby display application however some sites occasionally cause a java script error from the IE control. Is there any sure way to surpress these since there will not be ability for someone to click the dumb "continue running scripts" button. I tried messing with the settings for IE under Tool-> Internet OPtions -> Advanced but this seems to have no effect and I not sure whether these even propagate down to the control instance used by the application anyways. Thanks in advance!
Windows XP sp2
IE 6.0.290
DK
|
|
|
|
|
Oh I forgot to mention another reason why this is such a big issue. When the Java errors occur they application stops all activity, timers wont run, all other events will not be serviced until this occurs. So even if you are monitoring if the page loads properly by looking at the some state parameters associated with the IE control the Java script error dialog box stops time in the application until you manually click the "okay continue runnng scripts" button in the dialog box!
|
|
|
|
|
If you're using the Microsoft JVM, open Internet Explorer, click on the Tools menu, Internet Options, Advanced Tab and make sure that "Display a notification for every script error" is unchecked. Oh!, do this under the user account that your app is going to be running under.
If you're using the Sun JVM, go into Control Panels, Java Plug-In, Basic Tab and make sure the "Show Exception Dialog box" option is unchecked.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
If only it were that simple. If I turn off Display a notification for every script error I still get the indication that a script error has occured. Not sure why this cant be shut off. Were you able to verify that this method works? When I turn on the script debugging option in the same options area for IE it brings up the piece of offending code when the scipt arror is detected (arror is a null or not object type error for some ad ware). When I dont have the option to debug checked it just give me the dialog box about if I want to continue running scripts on this page. Why would the second option seems to have an effect but not the first one for not displaying a notification for script errors. Weird but I guess I'm still stuck.
|
|
|
|
|
Simple answer. Fix the error
|
|
|
|
|
KaptainKrunch is right. The simplest way to fix this problem is to not have it.
No, I haven't tried it. Time is short these days...
The only other thing you can try is to install Sun's Java RTE and TRY that. If it does something similar, your only option is to fix the code causing the errors.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I know what you mean. Its not my fault that IE does not handle script errors as per it's setting and that in general IE seems to have java-script incompatibilities but I guess it is my problem since it affects me... Its not even my Java code that is the affending culprit.
I have tried to look though MSDN for help. I think there may be a method that involves turning on script debugging and then the event can be detected and handled in a truley round about fashion within the VB program. I'll guess I'll have to dig through this.
Thanks.
|
|
|
|
|
Hi all,
i want to learn the concept of threads in VB.Somebody please help me with this.
Thanks in advance,
Sushma
|
|
|
|
|
|
Read the official VS2005 help it will answer your question.
You can also read the .NET FW system.threading.thread class documentation since contains code samples. It's really basic.
|
|
|
|
|
In VB6, is it possible to dispatch the events generated by a Winsock control that is in a form inside the module class. This winsock control is also a member variable of that class. I'd like to catch the DataArrival an Error events inside the class.
Thanks in advance,
MArc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
Hi,
Can anyone point me to a direction where I can find some info on how to set/remove user from folder security using vb.net.
Appreciate it..
Thanks...
|
|
|
|
|
In VB6, I'm trying to retrieve the Ascii code of some characters using the "Asc" function. When I try to do it for some spanish characters (special chars) like Ñ I should get a value of 165 but I get 209. What's happening? Am I using a wrong code page? How can I switch in VB6 to the correct one?
Thanks in advance,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
I didn't think that those sort of characters occured at all in ASCII ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Look at the extended ascii codes that are greater than 128 ...
ASCII table[^]
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
i have a data table containg ledger entries now i want to make a report of leger balances in crystal reports but i am facing problem to calculate opening balace in crystal reports
so if any body now
plz help me
Thanks
Rizwan Ullah
|
|
|
|
|
when u bind a datagrid to a database table the column headings that are displayed are the field name of the table. can we change that? if someone out there can help please do.
|
|
|
|
|
|
Thanks for the reply. But my problem is this:
I have a datagrid. i want to create the connection, bind the data and then change the header at run-time not at design time. If i am creating the connection and binding the data to the grid at design time then i am able to change the header by writing code on the code behind page. but when i am trying to create the connection and also bind the grid at runtime it is not working. can u help me with this?
|
|
|
|
|
What I was referring works perfectly also in your case. Have you followed the example in the official help? If you don't state exactly what you do, or post some code, it's rather complex to come up with an answer.
Other examples are also available on your help under the DataGridColumnStyle class documentation:
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.en/CPref17/html/T_System_Windows_Forms_DataGridColumnStyle.htm
|
|
|
|
|
i am sorry if i offended u in some way.
i was unable to open the link u specified.
c my prob is this:
i have a datagrid and i have created a connection at design time and populated the grid with data using the foll code.
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.SqlDataAdapter1.Fill(DataSet11)
then i wrote the code below to change the headers:
'Step 1: Create a DataGridTableStyle &
' set mappingname to table.
Dim tableStyle As New DataGridTableStyle
tableStyle.MappingName = "BillProductDet"
'Step 2: Create DataGridColumnStyle for each col
' we want to see in the grid and in the
' order that we want to see them.
'Step 2: BillNo
Dim column As New DataGridTextBoxColumn
column.MappingName = "BillNo"
column.HeaderText = "ID"
column.Width = 30
tableStyle.GridColumnStyles.Add(column)
'MfgDate
column = New DataGridTextBoxColumn
column.MappingName = "MfgDate"
column.HeaderText = "M.Date"
tableStyle.GridColumnStyles.Add(column)
'Step 2: UnitPrice
column = New DataGridTextBoxColumn
column.MappingName = "UnitPrice"
column.HeaderText = "Unit Price"
tableStyle.GridColumnStyles.Add(column)
'Step 3: Add the tablestyle to the datagrid
Me.DataGrid1.TableStyles.Add(tableStyle)
End Sub
this is working
but when i am tryting to create the connection at run time using the following code it is not working:
Dim sqlcon2 As New SqlConnection(constr)
Dim sqladp2 As New SqlDataAdapter
Dim cmdstr1 As New SqlCommand
Dim strq1 As String
sqlcon2.Open()
strq1 = "select * from Products"
Try
sqladp2.SelectCommand = cmdstr1
sqladp2.SelectCommand.CommandText = strq1
sqladp2.SelectCommand.Connection = sqlcon2
dsdata2.Clear()
sqladp2.Fill(dsdata2, "SearchResult")
If dsdata2.Tables("SearchResult").Rows.Count > 0 Then
dgrid.DataSource = dsdata2
dgrid.DataMember = "SearchResult"
dgrid.Refresh()
End If
cmdstr1.Dispose()
sqlcon2.Close()
sqlcon2.Dispose()
sqladp2.Dispose()
Catch empexp As SqlException
MessageBox.Show(empexp.Message)
End Try
when i write the code to change the header after this the code is not working.
hope now u understood the problem. and hope u can help me now.
thanks.
|
|
|
|
|
Hi,
I am not sure if this is what you are lookin for.
You can change the sql query like this
Select BillNo as ID,MfgDate as MDate,unitprice as 'Unit Price' from BillProduct.
This will give the header texts as you require.Otherwise there is no text property exposed for a rowheader cell. But you can handle the Paint event and draw header text yourself.
Hopes this meet ur needs
Vimal Raj
|
|
|
|